It should be possible to hoist all constants in DFG SSA
https://bugs.webkit.org/show_bug.cgi?id=145769
Reviewed by Geoffrey Garen.
It's sometimes somewhat more efficient, and convenient, to have all constants at the
top of the root block. We don't require this as an IR invariant because too many phases
want to be able to insert constants in weird places. But, this phase will be great for
preparing for https://bugs.webkit.org/show_bug.cgi?id=145768.
* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGConstantHoistingPhase.cpp: Added.
(JSC::DFG::performConstantHoisting):
* dfg/DFGConstantHoistingPhase.h: Added.
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@185344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed