Changeset 160328 in webkit


Ignore:
Timestamp:
Dec 9, 2013, 2:02:46 PM (12 years ago)
Author:
fpizlo@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r160325 r160328  
     12013-12-08  Filip Pizlo  <fpizlo@apple.com>
     2
     3        CSE should work in SSA
     4        https://bugs.webkit.org/show_bug.cgi?id=125430
     5
     6        Reviewed by Oliver Hunt and Mark Hahnenberg.
     7
     8        * dfg/DFGCSEPhase.cpp:
     9        (JSC::DFG::CSEPhase::run):
     10        (JSC::DFG::CSEPhase::performNodeCSE):
     11        * dfg/DFGPlan.cpp:
     12        (JSC::DFG::Plan::compileInThreadImpl):
     13
    1142013-12-09  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp

    r160295 r160328  
    4949    bool run()
    5050    {
    51         ASSERT((cseMode == NormalCSE) == (m_graph.m_fixpointState == FixpointNotConverged));
    5251        ASSERT(m_graph.m_fixpointState != BeforeFixpoint);
    5352       
     
    5655        m_graph.clearReplacements();
    5756       
    58         for (unsigned blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex)
    59             performBlockCSE(m_graph.block(blockIndex));
     57        if (m_graph.m_form == SSA) {
     58            Vector<BasicBlock*> depthFirst;
     59            m_graph.getBlocksInDepthFirstOrder(depthFirst);
     60            for (unsigned i = 0; i < depthFirst.size(); ++i)
     61                performBlockCSE(depthFirst[i]);
     62        } else {
     63            for (unsigned blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex)
     64                performBlockCSE(m_graph.block(blockIndex));
     65        }
    6066       
    6167        return m_changed;
     
    10161022            m_graph.performSubstitution(node);
    10171023       
    1018         if (node->op() == SetLocal)
     1024        if (node->containsMovHint()) {
     1025            ASSERT(node->op() != ZombieHint);
    10191026            node->child1()->mergeFlags(NodeRelevantToOSR);
     1027        }
    10201028       
    10211029        switch (node->op()) {
     
    11211129           
    11221130        case Flush: {
     1131            if (m_graph.m_form == SSA) {
     1132                // FIXME: Enable Flush store elimination in SSA form.
     1133                // https://bugs.webkit.org/show_bug.cgi?id=125429
     1134                break;
     1135            }
    11231136            VariableAccessData* variableAccessData = node->variableAccessData();
    11241137            VirtualRegister local = variableAccessData->local();
  • trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp

    r160292 r160328  
    270270        performCFA(dfg);
    271271        performLICM(dfg);
     272        performCSE(dfg);
    272273        performLivenessAnalysis(dfg);
    273274        performCFA(dfg);
Note: See TracChangeset for help on using the changeset viewer.