Ignore:
Timestamp:
Apr 21, 2015, 1:16:18 PM (10 years ago)
Author:
[email protected]
Message:

MovHint should be a strong use
https://bugs.webkit.org/show_bug.cgi?id=143734

Reviewed by Geoffrey Garen.

This disables any DCE that assumes equivalence between DFG IR uses and bytecode uses. Doing
so is a major step towards allowing more fancy DFG transformations and also probably fixing
some bugs.

Just making MovHint a strong use would also completely disable DCE. So we mitigate this by
introducing a MovHint removal phase that runs in FTL.

This is a slight slowdown on Octane/gbemu, but it's basically neutral on suite averages.

(JSC::InlineCallFrame::dumpInContext):

  • dfg/DFGDCEPhase.cpp:

(JSC::DFG::DCEPhase::fixupBlock):

  • dfg/DFGDisassembler.cpp:

(JSC::DFG::Disassembler::createDumpList):

  • dfg/DFGEpoch.cpp: Added.

(JSC::DFG::Epoch::dump):

  • dfg/DFGEpoch.h: Added.

(JSC::DFG::Epoch::Epoch):
(JSC::DFG::Epoch::first):
(JSC::DFG::Epoch::operator!):
(JSC::DFG::Epoch::next):
(JSC::DFG::Epoch::bump):
(JSC::DFG::Epoch::operator==):
(JSC::DFG::Epoch::operator!=):

  • dfg/DFGMayExit.cpp:

(JSC::DFG::mayExit):

  • dfg/DFGMovHintRemovalPhase.cpp: Added.

(JSC::DFG::performMovHintRemoval):

  • dfg/DFGMovHintRemovalPhase.h: Added.
  • dfg/DFGNodeType.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCurrentBlock):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • runtime/Options.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp

    r181993 r183072  
    144144               
    145145            switch (node->op()) {
    146             case MovHint: {
    147                 // Check if the child is dead. MovHint's child would only be a Phantom or
    148                 // Check if we had just killed it.
    149                 if (node->child1()->op() == Phantom || node->child1()->op() == Check) {
    150                     node->setOpAndDefaultFlags(ZombieHint);
    151                     node->child1() = Edge();
    152                     break;
    153                 }
    154                 break;
    155             }
    156                
    157             case ZombieHint: {
    158                 // Currently we assume that DCE runs only once.
     146            case MovHint:
     147            case ZombieHint:
     148                // These are not killable. (They once were.)
    159149                RELEASE_ASSERT_NOT_REACHED();
    160                 break;
    161             }
    162            
     150               
    163151            default: {
    164152                if (node->flags() & NodeHasVarArgs) {
Note: See TracChangeset for help on using the changeset viewer.