Commit 49079f7d authored by fpizlo@apple.com's avatar fpizlo@apple.com

CSE should work in SSA

https://bugs.webkit.org/show_bug.cgi?id=125430

Reviewed by Oliver Hunt and Mark Hahnenberg.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6a401857
2013-12-08 Filip Pizlo <fpizlo@apple.com>
CSE should work in SSA
https://bugs.webkit.org/show_bug.cgi?id=125430
Reviewed by Oliver Hunt and Mark Hahnenberg.
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
2013-12-09 Joseph Pecoraro <pecoraro@apple.com>
Remove docs/make-bytecode-docs.pl
......
......@@ -48,15 +48,21 @@ public:
bool run()
{
ASSERT((cseMode == NormalCSE) == (m_graph.m_fixpointState == FixpointNotConverged));
ASSERT(m_graph.m_fixpointState != BeforeFixpoint);
m_changed = false;
m_graph.clearReplacements();
for (unsigned blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex)
performBlockCSE(m_graph.block(blockIndex));
if (m_graph.m_form == SSA) {
Vector<BasicBlock*> depthFirst;
m_graph.getBlocksInDepthFirstOrder(depthFirst);
for (unsigned i = 0; i < depthFirst.size(); ++i)
performBlockCSE(depthFirst[i]);
} else {
for (unsigned blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex)
performBlockCSE(m_graph.block(blockIndex));
}
return m_changed;
}
......@@ -1015,8 +1021,10 @@ private:
if (cseMode == NormalCSE)
m_graph.performSubstitution(node);
if (node->op() == SetLocal)
if (node->containsMovHint()) {
ASSERT(node->op() != ZombieHint);
node->child1()->mergeFlags(NodeRelevantToOSR);
}
switch (node->op()) {
......@@ -1120,6 +1128,11 @@ private:
}
case Flush: {
if (m_graph.m_form == SSA) {
// FIXME: Enable Flush store elimination in SSA form.
// https://bugs.webkit.org/show_bug.cgi?id=125429
break;
}
VariableAccessData* variableAccessData = node->variableAccessData();
VirtualRegister local = variableAccessData->local();
Node* replacement = node->child1().node();
......
......@@ -269,6 +269,7 @@ Plan::CompilationPath Plan::compileInThreadImpl(LongLivedState& longLivedState)
performLivenessAnalysis(dfg);
performCFA(dfg);
performLICM(dfg);
performCSE(dfg);
performLivenessAnalysis(dfg);
performCFA(dfg);
if (Options::validateFTLOSRExitLiveness())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment