Merge backout.
authorDavid Anderson <danderson@mozilla.com>
Wed, 27 Jun 2012 13:05:16 -0700
changeset 106475 839a7e46762087aca46c2c016fc32c9898b79441
parent 106474 0f30f0a153add9dc3c254fcbddb61b284661cd44
child 106476 62c180773b87fd633d8013f7d77e0e3633d3b0df
push id23447
push userdanderson@mozilla.com
push dateTue, 11 Sep 2012 17:34:27 +0000
treeherdermozilla-central@fdfaef738a00 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge backout.
js/src/ion/IonAnalysis.cpp
js/src/ion/MIRGraph.cpp
js/src/ion/MIRGraph.h
--- a/js/src/ion/IonAnalysis.cpp
+++ b/js/src/ion/IonAnalysis.cpp
@@ -582,46 +582,16 @@ ion::BuildDominatorTree(MIRGraph &graph)
 
 #ifdef DEBUG
     // If compiling with OSR, many blocks will self-dominate.
     // Without OSR, there is only one root block which dominates all.
     if (!graph.osrBlock())
         JS_ASSERT(graph.begin()->numDominated() == graph.numBlocks() - 1);
 #endif
 
-    // Now, iterate through the dominator tree and annotate every
-    // block with its index in the pre-order traversal of the
-    // dominator tree.
-    Vector<MBasicBlock *, 1, IonAllocPolicy> worklist;
-
-    // The index of the current block in the CFG traversal.
-    size_t index = 0;
-
-    // Add all self-dominating blocks to the worklist.
-    // This includes all roots. Order does not matter.
-    for (MBasicBlockIterator i(graph.begin()); i != graph.end(); i++) {
-        MBasicBlock *block = *i;
-        if (block->immediateDominator() == block) {
-            if (!worklist.append(block))
-                return false;
-        }
-    }
-
-    // Starting from each self-dominating block, traverse the CFG in pre-order.
-    while (!worklist.empty()) {
-        MBasicBlock *block = worklist.popCopy();
-        block->setDomIndex(index);
-
-        for (size_t i = 0; i < block->numImmediatelyDominatedBlocks(); i++) {
-            if (!worklist.append(block->getImmediatelyDominatedBlock(i)))
-                return false;
-        }
-        index++;
-    }
-
     return true;
 }
 
 bool
 ion::BuildPhiReverseMapping(MIRGraph &graph)
 {
     // Build a mapping such that given a basic block, whose successor has one or
     // more phis, we can find our specific input to that phi. To make this fast
--- a/js/src/ion/MIRGraph.cpp
+++ b/js/src/ion/MIRGraph.cpp
@@ -593,24 +593,16 @@ MBasicBlock::assertUsesAreNotWithin(MUse
     for (; use != end; use++) {
         JS_ASSERT_IF(use->node()->isDefinition(),
                      use->node()->toDefinition()->block()->id() < id());
     }
 #endif
 }
 
 bool
-MBasicBlock::dominates(MBasicBlock *other)
-{
-    uint32 high = domIndex() + numDominated();
-    uint32 low  = domIndex();
-    return other->domIndex() >= low && other->domIndex() <= high;
-}
-
-bool
 MBasicBlock::setBackedge(MBasicBlock *pred)
 {
     // Predecessors must be finished, and at the correct stack depth.
     JS_ASSERT(lastIns_);
     JS_ASSERT(pred->lastIns_);
     JS_ASSERT(pred->stackDepth() == entryResumePoint()->stackDepth());
 
     // We must be a pending loop header
--- a/js/src/ion/MIRGraph.h
+++ b/js/src/ion/MIRGraph.h
@@ -104,18 +104,16 @@ class MBasicBlock : public TempObject, p
     // Creates a new basic block for a MIR generator. If |pred| is not NULL,
     // its slots and stack depth are initialized from |pred|.
     static MBasicBlock *New(MIRGraph &graph, CompileInfo &info,
                             MBasicBlock *pred, jsbytecode *entryPc, Kind kind);
     static MBasicBlock *NewPendingLoopHeader(MIRGraph &graph, CompileInfo &info,
                                              MBasicBlock *pred, jsbytecode *entryPc);
     static MBasicBlock *NewSplitEdge(MIRGraph &graph, CompileInfo &info, MBasicBlock *pred);
 
-    bool dominates(MBasicBlock *other);
-
     void setId(uint32 id) {
         id_ = id;
     }
 
     // Move the definition to the top of the stack.
     void pick(int32 depth);
 
     // Exchange 2 stack slots at the defined depth
@@ -222,24 +220,16 @@ class MBasicBlock : public TempObject, p
         return pc_;
     }
     uint32 id() const {
         return id_;
     }
     uint32 numPredecessors() const {
         return predecessors_.length();
     }
-
-    uint32 domIndex() const {
-        return domIndex_;
-    }
-    void setDomIndex(uint32 d) {
-        domIndex_ = d;
-    }
-
     MBasicBlock *getPredecessor(uint32 i) const {
         return predecessors_[i];
     }
     MControlInstruction *lastIns() const {
         return lastIns_;
     }
     MPhiIterator phisBegin() const {
         return phis_.begin();
@@ -441,17 +431,16 @@ class MBasicBlock : public TempObject, p
     InlineList<MInstruction> instructions_;
     Vector<MBasicBlock *, 1, IonAllocPolicy> predecessors_;
     InlineForwardList<MPhi> phis_;
     FixedList<MDefinition *> slots_;
     uint32 stackPosition_;
     MControlInstruction *lastIns_;
     jsbytecode *pc_;
     uint32 id_;
-    uint32 domIndex_; // Index in the dominator tree.
     LBlock *lir_;
     MStart *start_;
     MResumePoint *entryResumePoint_;
     MBasicBlock *successorWithPhis_;
     uint32 positionInPhiSuccessor_;
     Kind kind_;
     uint32 loopDepth_;