Bug 1026460 - Consider observable MIR nodes as live uses. r=shu, a=2.0+
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Fri, 20 Jun 2014 08:20:24 -0700
changeset 207269 6e08edd34e5b7a284c0f80b3422036c571d1acbe
parent 207268 34d3a6ced61d7aa0b0997ee4122e4dda05e74455
child 207270 e93838ffb061a154de2ee537916b29796089ba94
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu, 2
bugs1026460
milestone32.0a2
Bug 1026460 - Consider observable MIR nodes as live uses. r=shu, a=2.0+
js/src/jit/MIR.cpp
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -373,20 +373,24 @@ MDefinition::hasDefUses() const
     return false;
 }
 
 bool
 MDefinition::hasLiveDefUses() const
 {
     for (MUseIterator i(uses_.begin()); i != uses_.end(); i++) {
         MNode *ins = (*i)->consumer();
-        if (!ins->isDefinition())
-            continue;
-        if (!ins->toDefinition()->isRecoveredOnBailout())
-            return true;
+        if (ins->isDefinition()) {
+            if (!ins->toDefinition()->isRecoveredOnBailout())
+                return true;
+        } else {
+            MOZ_ASSERT(ins->isResumePoint());
+            if (ins->toResumePoint()->isObservableOperand(*i))
+                return true;
+        }
     }
 
     return false;
 }
 
 void
 MDefinition::replaceAllUsesWith(MDefinition *dom)
 {