Bug 768288: IonMonkey: Inline small functions with loops, r=djvj
☠☠ backed out by 58c6702b5d84 ☠ ☠
authorHannes Verschore <hv1989@gmail.com>
Thu, 09 May 2013 23:16:42 +0200
changeset 138225 8011f4e535fa3f6b929fcd0b1ab003d022327381
parent 138224 59347767166eff194c52b76e8231c6c4e343d8c9
child 138226 ffd964f431949ac8e73eba82a31e4ef740c6b940
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj
bugs768288
milestone23.0a1
Bug 768288: IonMonkey: Inline small functions with loops, r=djvj
js/src/ion/IonBuilder.cpp
js/src/jsanalyze.cpp
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -3532,16 +3532,22 @@ IonBuilder::makeInliningDecision(JSFunct
             return false;
         }
     } else {
         if (inliningDepth_ >= js_IonOptions.maxInlineDepth) {
             IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: exceeding allowed inline depth",
                                       targetScript->filename(), targetScript->lineno);
             return false;
         }
+
+        if (targetScript->analysis()->hasLoops()) {
+            IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: big function that contains a loop",
+                                      targetScript->filename(), targetScript->lineno);
+            return false;
+        }
      }
 
     // Always inline the empty script up to the inlining depth.
     if (targetScript->length == 1)
         return true;
 
     // Callee must not be excessively large.
     // This heuristic also applies to the callsite as a whole.
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -60,17 +60,17 @@ ScriptAnalysis::addJump(JSContext *cx, u
         code->stackDepth = stackDepth;
     }
     JS_ASSERT(code->stackDepth == stackDepth);
 
     code->jumpTarget = true;
 
     if (offset < *currentOffset) {
         /* Scripts containing loops are never inlined. */
-        isJaegerInlineable = isIonInlineable = false;
+        isJaegerInlineable = false;
         hasLoops_ = true;
 
         if (code->analyzed) {
             /*
              * Backedge in a do-while loop, the body has been analyzed. Rewalk
              * the body to set inLoop bits.
              */
             for (unsigned i = offset; i <= *currentOffset; i++) {