Bug 1245152 - Ensure enough ballast space before RangeAnalysis::tryHoistBoundsCheck. r=h4writer
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Wed, 17 Feb 2016 18:12:14 +0000
changeset 320940 93e0395f69fbe1242899b5e54610f4ad2d80ad27
parent 320939 c5d6c3e00c91dd0595a12b145c66cf4f2a890591
child 320941 4ec66e6db2d2df54f1fa61b093c11e385f5c2860
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1245152
milestone47.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 1245152 - Ensure enough ballast space before RangeAnalysis::tryHoistBoundsCheck. r=h4writer
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -1907,16 +1907,18 @@ RangeAnalysis::analyzeLoop(MBasicBlock* 
         for (ReversePostorderIterator iter(graph_.rpoBegin(header)); iter != graph_.rpoEnd(); iter++) {
             MBasicBlock* block = *iter;
             if (!block->isMarked())
                 continue;
 
             for (MDefinitionIterator iter(block); iter; iter++) {
                 MDefinition* def = *iter;
                 if (def->isBoundsCheck() && def->isMovable()) {
+                    if (!alloc().ensureBallast())
+                        return false;
                     if (tryHoistBoundsCheck(header, def->toBoundsCheck())) {
                         if (!hoistedChecks.append(def->toBoundsCheck()))
                             return false;
                     }
                 }
             }
         }