Bug 1125734 - IonMonkey: Completely disable the MakeLoopsContiguous optimization for loops made unnatural by OSR. r=jandem, a=abillings
authorDan Gohman <sunfish@mozilla.com>
Fri, 30 Jan 2015 15:02:29 -0500
changeset 243602 bbdf662015c0
parent 243601 d954028bddad
child 243603 26d78b7b0bfa
push id4411
push userryanvm@gmail.com
push date2015-01-30 20:02 +0000
treeherdermozilla-beta@03be92be95c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, abillings
bugs1125734
milestone36.0
Bug 1125734 - IonMonkey: Completely disable the MakeLoopsContiguous optimization for loops made unnatural by OSR. r=jandem, a=abillings
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -3456,15 +3456,22 @@ jit::MakeLoopsContiguous(MIRGraph &graph
         // Mark all blocks that are actually part of the loop.
         bool canOsr;
         size_t numMarked = MarkLoopBlocks(graph, header, &canOsr);
 
         // If the loop isn't a loop, don't try to optimize it.
         if (numMarked == 0)
             continue;
 
+        // If there's an OSR block entering the loop in the middle, it's tricky,
+        // so don't try to handle it, for now.
+        if (canOsr) {
+            UnmarkLoopBlocks(graph, header);
+            continue;
+        }
+
         // Move all blocks between header and backedge that aren't marked to
         // the end of the loop, making the loop itself contiguous.
         MakeLoopContiguous(graph, header, numMarked);
     }
 
     return true;
 }