Commit d652d06f authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Add absolute upper bound for small function inlining.

Introduce a flag --max-inlined-nodes-absolute that is used to limit the
number of nodes that we inline even in the presence of small function
inlining, so that TurboFan graphs don't grow arbitrary large.

BUG=chromium:724084,v8:6395,v8:6278,v8:6344,v8:6394
TBR=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2894523005
Cr-Commit-Position: refs/heads/master@{#45414}
parent 9b565002
......@@ -167,7 +167,7 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
}
// Forcibly inline small functions here.
if (small_inline) {
if (small_inline && cumulative_count_ <= FLAG_max_inlined_nodes_absolute) {
TRACE("Inlining small function(s) at call site #%d:%s\n", node->id(),
node->op()->mnemonic());
return InlineCandidate(candidate);
......
......@@ -360,6 +360,9 @@ DEFINE_INT(max_inlined_source_size, 600,
"maximum source size in bytes considered for a single inlining")
DEFINE_INT(max_inlined_nodes, 200,
"maximum number of AST nodes considered for a single inlining")
DEFINE_INT(max_inlined_nodes_absolute, 1600,
"maximum absolute number of AST nodes considered for inlining "
"(incl. small functions)")
DEFINE_INT(max_inlined_nodes_cumulative, 400,
"maximum cumulative number of AST nodes considered for inlining")
DEFINE_INT(max_inlined_nodes_small, 10,
......
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