Title: [160328] trunk/Source/_javascript_Core
- Revision
- 160328
- Author
- [email protected]
- Date
- 2013-12-09 14:02:46 -0800 (Mon, 09 Dec 2013)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (160327 => 160328)
--- trunk/Source/_javascript_Core/ChangeLog 2013-12-09 21:15:20 UTC (rev 160327)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-12-09 22:02:46 UTC (rev 160328)
@@ -1,3 +1,16 @@
+2013-12-08 Filip Pizlo <[email protected]>
+
+ 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 <[email protected]>
Remove docs/make-bytecode-docs.pl
Modified: trunk/Source/_javascript_Core/dfg/DFGCSEPhase.cpp (160327 => 160328)
--- trunk/Source/_javascript_Core/dfg/DFGCSEPhase.cpp 2013-12-09 21:15:20 UTC (rev 160327)
+++ trunk/Source/_javascript_Core/dfg/DFGCSEPhase.cpp 2013-12-09 22:02:46 UTC (rev 160328)
@@ -48,15 +48,21 @@
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 @@
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 @@
}
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();
Modified: trunk/Source/_javascript_Core/dfg/DFGPlan.cpp (160327 => 160328)
--- trunk/Source/_javascript_Core/dfg/DFGPlan.cpp 2013-12-09 21:15:20 UTC (rev 160327)
+++ trunk/Source/_javascript_Core/dfg/DFGPlan.cpp 2013-12-09 22:02:46 UTC (rev 160328)
@@ -269,6 +269,7 @@
performLivenessAnalysis(dfg);
performCFA(dfg);
performLICM(dfg);
+ performCSE(dfg);
performLivenessAnalysis(dfg);
performCFA(dfg);
if (Options::validateFTLOSRExitLiveness())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes