⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242276 in webkit


Ignore:
Timestamp:
Mar 1, 2019, 11:24:08 AM (7 years ago)
Author:
rmorisset@apple.com
Message:

DFG: Loop-invariant code motion (LICM) should not hoist dead code
https://bugs.webkit.org/show_bug.cgi?id=194945
<rdar://problem/48311657>

Reviewed by Saam Barati.

  • dfg/DFGLICMPhase.cpp:

(JSC::DFG::LICMPhase::run):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r242252 r242276  
    5656        (bar):
    5757        (foo):
     58
     592019-02-27  Robin Morisset  <rmorisset@apple.com>
     60
     61        DFG: Loop-invariant code motion (LICM) should not hoist dead code
     62        https://bugs.webkit.org/show_bug.cgi?id=194945
     63        <rdar://problem/48311657>
     64
     65        Reviewed by Mark Lam.
     66
     67        * stress/licm-dead-code.js: Added.
    5868
    59692019-02-26  Yusuke Suzuki  <ysuzuki@apple.com>
  • trunk/Source/JavaScriptCore/ChangeLog

    r242263 r242276  
    415415        * bytecode/CodeBlock.cpp:
    416416        (JSC::CodeBlock::nameForRegister):
     417
     4182019-02-27  Robin Morisset  <rmorisset@apple.com>
     419
     420        DFG: Loop-invariant code motion (LICM) should not hoist dead code
     421        https://bugs.webkit.org/show_bug.cgi?id=194945
     422        <rdar://problem/48311657>
     423
     424        Reviewed by Saam Barati.
     425
     426        * dfg/DFGLICMPhase.cpp:
     427        (JSC::DFG::LICMPhase::run):
    417428
    4184292019-02-27  Antoine Quint  <graouts@apple.com>
  • trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp

    r232075 r242276  
    185185        bool changed = false;
    186186        for (BasicBlock* block : m_graph.blocksInPreOrder()) {
     187            if (!block->cfaHasVisited)
     188                continue;
     189
    187190            const NaturalLoop* loop = m_graph.m_ssaNaturalLoops->innerMostLoopOf(block);
    188191            if (!loop)
     
    211214            for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
    212215                Node*& nodeRef = block->at(nodeIndex);
     216                if (nodeRef->op() == ForceOSRExit)
     217                    break;
    213218                for (unsigned stackIndex = loopStack.size(); stackIndex--;)
    214219                    changed |= attemptHoist(block, nodeRef, loopStack[stackIndex]);
Note: See TracChangeset for help on using the changeset viewer.