Commit 259f061f authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Introduce --min-inlining-frequency flag.

Add a new flag --min-inlining-frequency, defaulting to 0.15, which
serves as a minimum threshold for callsites to be considered by the
TurboFan inlining heuristic. Call sites with a frequency below this
(i.e. a call site that is only hit every 10th invocation of the caller)
are not considered for inlining.

BUG=v8:4493,v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2859433002
Cr-Commit-Position: refs/heads/master@{#45031}
parent 41af9bc5
......@@ -146,6 +146,13 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
break;
}
// Don't consider a {candidate} whose frequency is below the
// threshold, i.e. a call site that is only hit once every N
// invocations of the caller.
if (candidate.frequency < FLAG_min_inlining_frequency) {
return NoChange();
}
// In the general case we remember the candidate for later.
candidates_.insert(candidate);
return NoChange();
......
......@@ -361,6 +361,7 @@ DEFINE_INT(max_inlined_nodes, 200,
"maximum number of AST nodes considered for a single inlining")
DEFINE_INT(max_inlined_nodes_cumulative, 400,
"maximum cumulative number of AST nodes considered for inlining")
DEFINE_FLOAT(min_inlining_frequency, 0.15, "minimum frequency for inlining")
DEFINE_BOOL(loop_invariant_code_motion, true, "loop invariant code motion")
DEFINE_BOOL(fast_math, true, "faster (but maybe less accurate) math functions")
DEFINE_BOOL(hydrogen_stats, false, "print statistics for hydrogen")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment