Bug 733353 - IonMonkey: Don't allocate new instruction IDs when moving existing instructions. r=jandem
authorDan Gohman <sunfish@mozilla.com>
Fri, 06 Jun 2014 08:21:48 -0700
changeset 207537 5429275a038dba7577d1371a35fbd65ea637bb15
parent 207536 5b4bd2f81719a1a2ef9623ebe0023e771aa7fe25
child 207538 c3a7683c8c9e0483ec4fc27d0408fab0760de9ca
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)
reviewersjandem
bugs733353
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 733353 - IonMonkey: Don't allocate new instruction IDs when moving existing instructions. r=jandem
js/src/jit/MIRGraph.cpp
--- a/js/src/jit/MIRGraph.cpp
+++ b/js/src/jit/MIRGraph.cpp
@@ -686,17 +686,19 @@ void
 MBasicBlock::moveBefore(MInstruction *at, MInstruction *ins)
 {
     // Remove |ins| from the current block.
     JS_ASSERT(ins->block() == this);
     instructions_.remove(ins);
 
     // Insert into new block, which may be distinct.
     // Uses and operands are untouched.
-    at->block()->insertBefore(at, ins);
+    ins->setBlock(at->block());
+    at->block()->instructions_.insertBefore(at, ins);
+    ins->setTrackedSite(at->trackedSite());
 }
 
 static inline void
 AssertSafelyDiscardable(MDefinition *def)
 {
 #ifdef DEBUG
     // Instructions captured by resume points cannot be safely discarded, since
     // they are necessary for interpreter frame reconstruction in case of bailout.