Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/compiler/js-inlining-heuristic.cc

Issue 2329923002: [turbofan] Properly respect --max_inlining_levels with Ignition. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/js-inlining-heuristic.h" 5 #include "src/compiler/js-inlining-heuristic.h"
6 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 if (force_inline) return InlineCandidate(candidate); 103 if (force_inline) return InlineCandidate(candidate);
104 if (!can_inline) return NoChange(); 104 if (!can_inline) return NoChange();
105 105
106 // Stop inlining once the maximum allowed level is reached. 106 // Stop inlining once the maximum allowed level is reached.
107 int level = 0; 107 int level = 0;
108 for (Node* frame_state = NodeProperties::GetFrameStateInput(node); 108 for (Node* frame_state = NodeProperties::GetFrameStateInput(node);
109 frame_state->opcode() == IrOpcode::kFrameState; 109 frame_state->opcode() == IrOpcode::kFrameState;
110 frame_state = NodeProperties::GetFrameStateInput(frame_state)) { 110 frame_state = NodeProperties::GetFrameStateInput(frame_state)) {
111 FrameStateInfo const& frame_info = OpParameter<FrameStateInfo>(frame_state); 111 FrameStateInfo const& frame_info = OpParameter<FrameStateInfo>(frame_state);
112 if (frame_info.type() == FrameStateType::kJavaScriptFunction) { 112 if (FrameStateFunctionInfo::IsJSFunctionType(frame_info.type())) {
113 if (++level > FLAG_max_inlining_levels) { 113 if (++level > FLAG_max_inlining_levels) {
114 TRACE( 114 TRACE(
115 "Not considering call site #%d:%s, because inlining depth " 115 "Not considering call site #%d:%s, because inlining depth "
116 "%d exceeds maximum allowed level %d\n", 116 "%d exceeds maximum allowed level %d\n",
117 node->id(), node->op()->mnemonic(), level, 117 node->id(), node->op()->mnemonic(), level,
118 FLAG_max_inlining_levels); 118 FLAG_max_inlining_levels);
119 return NoChange(); 119 return NoChange();
120 } 120 }
121 } 121 }
122 } 122 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return jsgraph()->common(); 307 return jsgraph()->common();
308 } 308 }
309 309
310 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const { 310 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const {
311 return jsgraph()->simplified(); 311 return jsgraph()->simplified();
312 } 312 }
313 313
314 } // namespace compiler 314 } // namespace compiler
315 } // namespace internal 315 } // namespace internal
316 } // namespace v8 316 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698