Bug 1125734 - IonMonkey: Completely disable the MakeLoopsContiguous optimization for loops made unnatural by OSR. r=jandem, a=2.0+
authorDan Gohman <sunfish@mozilla.com>
Fri, 30 Jan 2015 15:02:29 -0500
changeset 204620 b961877cacba81e9077519b1876ee4a4d05a70b0
parent 204619 5b7a65269126757545902beb6e058cc9015be96d
child 204621 1ebfb977fa670ecfe52e187294b12d65633a4106
push id133
push userkli@mozilla.com
push dateTue, 03 Feb 2015 15:47:24 +0000
treeherdermozilla-b2g32_v2_0m@366fcf9adec4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, 2.0
bugs1125734
milestone32.0
Bug 1125734 - IonMonkey: Completely disable the MakeLoopsContiguous optimization for loops made unnatural by OSR. r=jandem, a=2.0+
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2639,15 +2639,22 @@ jit::MakeLoopsContiguous(MIRGraph &graph
         MBasicBlock *header = *i;
         if (!header->isLoopHeader())
             continue;
 
         // Mark all blocks that are actually part of the loop.
         bool canOsr;
         size_t numMarked = MarkLoopBlocks(graph, header, &canOsr);
 
+        // 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;
 }