Bug 1532599 - Branch Pruning: Flag all Phi loops as used. r=jandem
authorNicolas B. Pierron <nicolas.b.pierron@nbp.name>
Thu, 21 Mar 2019 19:38:09 +0000
changeset 465973 044a64c70a3b7072f1d9e00097b7a8745f43e709
parent 465966 4146cbd2103cb97b239033f215eb750f1ca880f1
child 465974 5b0704b4bf50c69b9552c0f4f9043444b2e04b19
push id112550
push userrgurzau@mozilla.com
push dateTue, 26 Mar 2019 09:57:15 +0000
treeherdermozilla-inbound@b8be99473610 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1532599
milestone68.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 1532599 - Branch Pruning: Flag all Phi loops as used. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D23331
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -99,19 +99,20 @@ static bool DepthFirstSearchUse(MIRGener
           cphi->isImplicitlyUsed()) {
         // The information got cached on the Phi the last time it
         // got visited, or when flagging operands of removed
         // instructions.
         return push(producer, use);
       }
 
       if (cphi->isInWorklist() || cphi == producer) {
-        // We are already iterating over the uses of this Phi
-        // instruction. Skip it.
-        continue;
+        // We are already iterating over the uses of this Phi instruction which
+        // are part of a loop, instead of trying to handle loops, conservatively
+        // mark them as used.
+        return push(producer, use);
       }
 
       if (cphi->getUsageAnalysis() == PhiUsage::Unused) {
         // The instruction already got visited and is known to have
         // no uses. Skip it.
         continue;
       }