Skip to content
  • fpizlo@apple.com's avatar
    DFG should not run full CSE after the optimization fixpoint, since it really... · a5d6cf4a
    fpizlo@apple.com authored
    DFG should not run full CSE after the optimization fixpoint, since it really just wants store elimination
    https://bugs.webkit.org/show_bug.cgi?id=111536
    
    Reviewed by Oliver Hunt and Mark Hahnenberg.
            
    The fixpoint will do aggressive load elimination and pure CSE. There's no need to do it after the fixpoint.
    On the other hand, the fixpoint does not profit from doing store elimination (except for SetLocal/Flush).
    Previously we had CSE do both, and had it avoid doing some store elimination during the fixpoint by querying
    the fixpoint state. This changes CSE to be templated on mode - either NormalCSE or StoreElimination - so
    that we explicitly put it into one of those modes depending on where we call it from. The goal is to reduce
    time spent doing load elimination after the fixpoint, since that is just wasted cycles.
    
    * dfg/DFGCSEPhase.cpp:
    (JSC::DFG::CSEPhase::CSEPhase):
    (JSC::DFG::CSEPhase::run):
    (JSC::DFG::CSEPhase::performNodeCSE):
    (JSC::DFG::CSEPhase::performBlockCSE):
    (JSC::DFG::performCSE):
    (DFG):
    (JSC::DFG::performStoreElimination):
    * dfg/DFGCSEPhase.h:
    (DFG):
    * dfg/DFGDriver.cpp:
    (JSC::DFG::compile):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a5d6cf4a