Ignore:
Timestamp:
Mar 6, 2013, 9:41:40 AM (12 years ago)
Author:
[email protected]
Message:

DFG should not check if nodes are shouldGenerate prior to DCE
https://bugs.webkit.org/show_bug.cgi?id=111520

Reviewed by Geoffrey Garen.

All nodes are live before DCE. We don't need to check that they aren't, because they
definitely will be.

  • dfg/DFGArgumentsSimplificationPhase.cpp:

(JSC::DFG::ArgumentsSimplificationPhase::run):

  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::performBlockCFA):

  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::keepOperandAlive):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::pureCSE):
(JSC::DFG::CSEPhase::int32ToDoubleCSE):
(JSC::DFG::CSEPhase::constantCSE):
(JSC::DFG::CSEPhase::weakConstantCSE):
(JSC::DFG::CSEPhase::getCalleeLoadElimination):
(JSC::DFG::CSEPhase::getArrayLengthElimination):
(JSC::DFG::CSEPhase::globalVarLoadElimination):
(JSC::DFG::CSEPhase::scopedVarLoadElimination):
(JSC::DFG::CSEPhase::globalVarWatchpointElimination):
(JSC::DFG::CSEPhase::globalVarStoreElimination):
(JSC::DFG::CSEPhase::scopedVarStoreElimination):
(JSC::DFG::CSEPhase::getByValLoadElimination):
(JSC::DFG::CSEPhase::checkStructureElimination):
(JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
(JSC::DFG::CSEPhase::putStructureStoreElimination):
(JSC::DFG::CSEPhase::getByOffsetLoadElimination):
(JSC::DFG::CSEPhase::putByOffsetStoreElimination):
(JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
(JSC::DFG::CSEPhase::checkArrayElimination):
(JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
(JSC::DFG::CSEPhase::getMyScopeLoadElimination):
(JSC::DFG::CSEPhase::getLocalLoadElimination):
(JSC::DFG::CSEPhase::setLocalStoreElimination):
(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGStructureCheckHoistingPhase.cpp:

(JSC::DFG::StructureCheckHoistingPhase::run):

File:
1 edited

Legend:

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

    r144862 r144939  
    9595                break;
    9696
    97             if (!otherNode->shouldGenerate())
    98                 continue;
    99            
    10097            if (node->op() != otherNode->op())
    10198                continue;
     
    133130            if (otherNode == node->child1())
    134131                return 0;
    135             if (!otherNode->shouldGenerate())
    136                 continue;
    137132            switch (otherNode->op()) {
    138133            case Int32ToDouble:
     
    155150                continue;
    156151           
    157             if (!otherNode->shouldGenerate())
    158                 continue;
    159            
    160152            if (otherNode->constantNumber() != node->constantNumber())
    161153                continue;
     
    173165                continue;
    174166           
    175             if (!otherNode->shouldGenerate())
    176                 continue;
    177            
    178167            if (otherNode->weakConstant() != node->weakConstant())
    179168                continue;
     
    188177        for (unsigned i = m_indexInBlock; i--;) {
    189178            Node* node = m_currentBlock->at(i);
    190             if (!node->shouldGenerate())
    191                 continue;
    192179            if (node->codeOrigin.inlineCallFrame != inlineCallFrame)
    193180                continue;
     
    208195        for (unsigned i = m_indexInBlock; i--;) {
    209196            Node* node = m_currentBlock->at(i);
    210             if (!node->shouldGenerate())
    211                 continue;
    212197            switch (node->op()) {
    213198            case GetArrayLength:
     
    235220        for (unsigned i = m_indexInBlock; i--;) {
    236221            Node* node = m_currentBlock->at(i);
    237             if (!node->shouldGenerate())
    238                 continue;
    239222            switch (node->op()) {
    240223            case GetGlobalVar:
     
    259242        for (unsigned i = m_indexInBlock; i--;) {
    260243            Node* node = m_currentBlock->at(i);
    261             if (!node->shouldGenerate())
    262                 continue;
    263244            switch (node->op()) {
    264245            case GetScopedVar: {
     
    292273        for (unsigned i = m_indexInBlock; i--;) {
    293274            Node* node = m_currentBlock->at(i);
    294             if (!node->shouldGenerate())
    295                 continue;
    296275            switch (node->op()) {
    297276            case GlobalVarWatchpoint:
     
    316295        for (unsigned i = m_indexInBlock; i--;) {
    317296            Node* node = m_currentBlock->at(i);
    318             if (!node->shouldGenerate())
    319                 continue;
    320297            switch (node->op()) {
    321298            case PutGlobalVar:
     
    343320        for (unsigned i = m_indexInBlock; i--;) {
    344321            Node* node = m_currentBlock->at(i);
    345             if (!node->shouldGenerate())
    346                 continue;
    347322            switch (node->op()) {
    348323            case PutScopedVar: {
     
    383358                break;
    384359
    385             if (!node->shouldGenerate())
    386                 continue;
    387360            switch (node->op()) {
    388361            case GetByVal:
     
    452425                break;
    453426
    454             if (!node->shouldGenerate())
    455                 continue;
    456427            switch (node->op()) {
    457428            case CheckStructure:
     
    513484                break;
    514485
    515             if (!node->shouldGenerate())
    516                 continue;
    517486            switch (node->op()) {
    518487            case CheckStructure:
     
    568537            if (node == child1)
    569538                break;
    570             if (!node->shouldGenerate())
    571                 continue;
    572539            switch (node->op()) {
    573540            case CheckStructure:
     
    627594                break;
    628595
    629             if (!node->shouldGenerate())
    630                 continue;
    631596            switch (node->op()) {
    632597            case GetByOffset:
     
    674639                break;
    675640
    676             if (!node->shouldGenerate())
    677                 continue;
    678641            switch (node->op()) {
    679642            case GetByOffset:
     
    719682                break;
    720683
    721             if (!node->shouldGenerate())
    722                 continue;
    723684            switch (node->op()) {
    724685            case GetButterfly:
     
    776737                break;
    777738
    778             if (!node->shouldGenerate())
    779                 continue;
    780739            switch (node->op()) {
    781740            case PutByOffset:
     
    812771                break;
    813772
    814             if (!node->shouldGenerate())
    815                 continue;
    816773            switch (node->op()) {
    817774            case GetIndexedPropertyStorage: {
     
    840797        for (unsigned i = m_indexInBlock; i--;) {
    841798            Node* node = m_currentBlock->at(i);
    842             if (!node->shouldGenerate())
    843                 continue;
    844799            if (node->codeOrigin.inlineCallFrame != inlineCallFrame)
    845800                continue;
     
    865820        for (unsigned i = m_indexInBlock; i--;) {
    866821            Node* node = m_currentBlock->at(i);
    867             if (!node->shouldGenerate())
    868                 continue;
    869822            switch (node->op()) {
    870823            case GetLocal:
     
    921874        for (unsigned i = m_indexInBlock; i--;) {
    922875            Node* node = m_currentBlock->at(i);
    923             if (!node->shouldGenerate())
    924                 continue;
    925876            switch (node->op()) {
    926877            case GetLocal:
     
    10651016        if (node->op() == SetLocal)
    10661017            node->child1()->mergeFlags(NodeRelevantToOSR);
    1067        
    1068         if (!node->shouldGenerate())
    1069             return;
    10701018       
    10711019#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
     
    12001148                break;
    12011149            ASSERT(replacement->op() == SetLocal);
    1202             ASSERT(replacement->shouldGenerate());
    12031150            // FIXME: Investigate using mayExit as a further optimization.
    12041151            node->convertToPhantom();
Note: See TracChangeset for help on using the changeset viewer.