Bug 1263895 - IonMonkey: Check return value of all functions in GVN, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Wed, 13 Apr 2016 10:04:02 -0400
changeset 330904 14af533af3819e9c26e57f0458784b07a82e92b2
parent 330903 beb7e5d6538b4ccf13db9d282075f99eaf23b2ca
child 330905 5d944b43c2173abb3426503ced62074ba739e112
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1263895
milestone48.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 1263895 - IonMonkey: Check return value of all functions in GVN, r=jandem
js/src/jit/ValueNumbering.cpp
--- a/js/src/jit/ValueNumbering.cpp
+++ b/js/src/jit/ValueNumbering.cpp
@@ -490,17 +490,18 @@ ValueNumberer::removePredecessorAndDoDCE
             return false;
 
         // If |nextDef_| became dead while we had it pinned, advance the iterator
         // and discard it now.
         while (nextDef_ && !nextDef_->hasUses()) {
             phi = nextDef_->toPhi();
             iter++;
             nextDef_ = iter != end ? *iter : nullptr;
-            discardDefsRecursively(phi);
+            if (!discardDefsRecursively(phi))
+                return false;
         }
     }
     nextDef_ = nullptr;
 
     block->removePredecessorWithoutPhiOperands(pred, predIndex);
     return true;
 }
 
@@ -1221,18 +1222,20 @@ ValueNumberer::run(UpdateAliasAnalysisFl
 {
     updateAliasAnalysis_ = updateAliasAnalysis == UpdateAliasAnalysis;
 
     JitSpew(JitSpew_GVN, "Running GVN on graph (with %llu blocks)",
             uint64_t(graph_.numBlocks()));
 
     // Adding fixup blocks only make sense iff we have a second entry point into
     // the graph which cannot be reached any more from the entry point.
-    if (graph_.osrBlock())
-        insertOSRFixups();
+    if (graph_.osrBlock()) {
+        if (!insertOSRFixups())
+            return false;
+    }
 
     // Top level non-sparse iteration loop. If an iteration performs a
     // significant change, such as discarding a block which changes the
     // dominator tree and may enable more optimization, this loop takes another
     // iteration.
     int runs = 0;
     for (;;) {
         if (!visitGraph())
@@ -1279,14 +1282,15 @@ ValueNumberer::run(UpdateAliasAnalysisFl
             break;
         }
 
         JitSpew(JitSpew_GVN, "Re-running GVN on graph (run %d, now with %llu blocks)",
                 runs, uint64_t(graph_.numBlocks()));
     }
 
     if (MOZ_UNLIKELY(hasOSRFixups_)) {
-        cleanupOSRFixups();
+        if (!cleanupOSRFixups())
+            return false;
         hasOSRFixups_ = false;
     }
 
     return true;
 }