Bug 1020455 - IonMonkey: Remove LIRGraph's redundant osrBlock field. r=sstangl
authorDan Gohman <sunfish@mozilla.com>
Wed, 04 Jun 2014 14:08:21 -0700
changeset 206990 81a81052fe9ff567318a6d79c270c6f5d350f85d
parent 206989 48b40e6ca833122df7b07af0a4d8dc9375c9d70f
child 206991 daae873f90b3252b46426170311921e1e3edfc1c
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs1020455
milestone32.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
Bug 1020455 - IonMonkey: Remove LIRGraph's redundant osrBlock field. r=sstangl
js/src/jit/LIR.cpp
js/src/jit/LIR.h
js/src/jit/LiveRangeAllocator.cpp
js/src/jit/Lowering.cpp
--- a/js/src/jit/LIR.cpp
+++ b/js/src/jit/LIR.cpp
@@ -23,17 +23,16 @@ LIRGraph::LIRGraph(MIRGraph *mir)
     constantPoolMap_(mir->alloc()),
     safepoints_(mir->alloc()),
     nonCallSafepoints_(mir->alloc()),
     numVirtualRegisters_(0),
     numInstructions_(1), // First id is 1.
     localSlotCount_(0),
     argumentSlotCount_(0),
     entrySnapshot_(nullptr),
-    osrBlock_(nullptr),
     mir_(*mir)
 {
 }
 
 bool
 LIRGraph::addConstantToPool(const Value &v, uint32_t *index)
 {
     JS_ASSERT(constantPoolMap_.initialized());
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -1486,19 +1486,16 @@ class LIRGraph
     // Number of stack slots needed for local spills.
     uint32_t localSlotCount_;
     // Number of stack slots needed for argument construction for calls.
     uint32_t argumentSlotCount_;
 
     // Snapshot taken before any LIR has been lowered.
     LSnapshot *entrySnapshot_;
 
-    // LBlock containing LOsrEntry, or nullptr.
-    LBlock *osrBlock_;
-
     MIRGraph &mir_;
 
   public:
     explicit LIRGraph(MIRGraph *mir);
 
     bool init() {
         return constantPoolMap_.init() && blocks_.init(mir_.alloc(), mir_.numBlocks());
     }
@@ -1575,23 +1572,16 @@ class LIRGraph
         JS_ASSERT(snapshot->bailoutKind() == Bailout_Normal);
         snapshot->setBailoutKind(Bailout_ArgumentCheck);
         entrySnapshot_ = snapshot;
     }
     LSnapshot *entrySnapshot() const {
         JS_ASSERT(entrySnapshot_);
         return entrySnapshot_;
     }
-    void setOsrBlock(LBlock *block) {
-        JS_ASSERT(!osrBlock_);
-        osrBlock_ = block;
-    }
-    LBlock *osrBlock() const {
-        return osrBlock_;
-    }
     bool noteNeedsSafepoint(LInstruction *ins);
     size_t numNonCallSafepoints() const {
         return nonCallSafepoints_.length();
     }
     LInstruction *getNonCallSafepoint(size_t i) const {
         return nonCallSafepoints_[i];
     }
     size_t numSafepoints() const {
--- a/js/src/jit/LiveRangeAllocator.cpp
+++ b/js/src/jit/LiveRangeAllocator.cpp
@@ -813,24 +813,25 @@ LiveRangeAllocator<VREG, forLSRA>::build
                     }
                 }
 
                 // Terminate loop if out of work.
                 if (loopWorkList.empty())
                     break;
 
                 // Grab the next block off the work list, skipping any OSR block.
+                MBasicBlock *osrBlock = graph.mir().osrBlock();
                 while (!loopWorkList.empty()) {
                     loopBlock = loopWorkList.popCopy();
-                    if (loopBlock->lir() != graph.osrBlock())
+                    if (loopBlock != osrBlock)
                         break;
                 }
 
                 // If end is reached without finding a non-OSR block, then no more work items were found.
-                if (loopBlock->lir() == graph.osrBlock()) {
+                if (loopBlock == osrBlock) {
                     JS_ASSERT(loopWorkList.empty());
                     break;
                 }
             }
 
             // Clear the done set for other loops
             loopDone->clear();
         }
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -3748,14 +3748,11 @@ LIRGenerator::generate()
     for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) {
         if (gen->shouldCancel("Lowering (main loop)"))
             return false;
 
         if (!visitBlock(*block))
             return false;
     }
 
-    if (graph.osrBlock())
-        lirGraph_.setOsrBlock(graph.osrBlock()->lir());
-
     lirGraph_.setArgumentSlotCount(maxargslots_);
     return true;
 }