Ignore:
Timestamp:
Jan 2, 2014, 12:15:25 PM (12 years ago)
Author:
[email protected]
Message:

Rationalize DFG DCE
https://bugs.webkit.org/show_bug.cgi?id=125523

Reviewed by Mark Hahnenberg.

Adds the ability to DCE more things. It's now the case that if a node is completely
pure, we clear NodeMustGenerate and the node becomes a DCE candidate.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDCEPhase.cpp:

(JSC::DFG::DCEPhase::cleanVariables):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::clobbersWorld):

  • dfg/DFGNodeType.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileAdd):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileValueAdd):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGClobberize.h

    r161126 r161218  
    205205    case GetMyArgumentsLengthSafe:
    206206    case GetMyArgumentByValSafe:
     207    case ValueAdd:
    207208        read(World);
    208209        write(World);
    209210        return;
    210        
    211     case ValueAdd:
    212         switch (node->binaryUseKind()) {
    213         case Int32Use:
    214         case NumberUse:
    215         case MachineIntUse:
    216             return;
    217         case UntypedUse:
    218             read(World);
    219             write(World);
    220             return;
    221         default:
    222             RELEASE_ASSERT_NOT_REACHED();
    223             return;
    224         }
    225211       
    226212    case GetCallee:
     
    580566        return;
    581567       
     568    case CompareEq:
    582569    case CompareLess:
    583570    case CompareLessEq:
    584571    case CompareGreater:
    585572    case CompareGreaterEq:
    586         if (graph.isPredictedNumerical(node))
    587             return;
    588         read(World);
    589         write(World);
    590         return;
    591        
    592     case CompareEq:
    593         if (graph.isPredictedNumerical(node)
    594             || node->isBinaryUseKind(StringUse)
    595             || node->isBinaryUseKind(StringIdentUse))
    596             return;
    597        
    598         if ((node->child1().useKind() == ObjectUse || node->child1().useKind() == ObjectOrOtherUse)
    599             && (node->child2().useKind() == ObjectUse || node->child2().useKind() == ObjectOrOtherUse))
    600             return;
    601        
     573        if (!node->isBinaryUseKind(UntypedUse))
     574            return;
    602575        read(World);
    603576        write(World);
Note: See TracChangeset for help on using the changeset viewer.