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

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

Issue 2894523005: [turbofan] Add absolute upper bound for small function inlining. (Closed)
Patch Set: Created 3 years, 7 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 | src/flag-definitions.h » ('j') | 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // Don't consider a {candidate} whose frequency is below the 161 // Don't consider a {candidate} whose frequency is below the
162 // threshold, i.e. a call site that is only hit once every N 162 // threshold, i.e. a call site that is only hit once every N
163 // invocations of the caller. 163 // invocations of the caller.
164 if (candidate.frequency.IsKnown() && 164 if (candidate.frequency.IsKnown() &&
165 candidate.frequency.value() < FLAG_min_inlining_frequency) { 165 candidate.frequency.value() < FLAG_min_inlining_frequency) {
166 return NoChange(); 166 return NoChange();
167 } 167 }
168 168
169 // Forcibly inline small functions here. 169 // Forcibly inline small functions here.
170 if (small_inline) { 170 if (small_inline && cumulative_count_ <= FLAG_max_inlined_nodes_absolute) {
171 TRACE("Inlining small function(s) at call site #%d:%s\n", node->id(), 171 TRACE("Inlining small function(s) at call site #%d:%s\n", node->id(),
172 node->op()->mnemonic()); 172 node->op()->mnemonic());
173 return InlineCandidate(candidate); 173 return InlineCandidate(candidate);
174 } 174 }
175 175
176 // In the general case we remember the candidate for later. 176 // In the general case we remember the candidate for later.
177 candidates_.insert(candidate); 177 candidates_.insert(candidate);
178 return NoChange(); 178 return NoChange();
179 } 179 }
180 180
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return jsgraph()->common(); 342 return jsgraph()->common();
343 } 343 }
344 344
345 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const { 345 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const {
346 return jsgraph()->simplified(); 346 return jsgraph()->simplified();
347 } 347 }
348 348
349 } // namespace compiler 349 } // namespace compiler
350 } // namespace internal 350 } // namespace internal
351 } // namespace v8 351 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698