From fea7ddb64069114d82c20951dd6948612e64ae7f Mon Sep 17 00:00:00 2001 From: verwaest Date: Tue, 3 Feb 2015 07:02:43 -0800 Subject: [PATCH] Reset inlining limits due to overly long compilation times in Speedometer, Dart2JS BUG=454625 LOG=y Review URL: https://codereview.chromium.org/900553003 Cr-Commit-Position: refs/heads/master@{#26405} --- src/flag-definitions.h | 6 +++--- src/hydrogen.cc | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 9cdfa3a54c..ef89cac35a 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -286,11 +286,11 @@ DEFINE_BOOL(use_local_allocation_folding, false, "only fold in basic blocks") DEFINE_BOOL(use_write_barrier_elimination, true, "eliminate write barriers targeting allocations in optimized code") DEFINE_INT(max_inlining_levels, 5, "maximum number of inlining levels") -DEFINE_INT(max_inlined_source_size, 1150, +DEFINE_INT(max_inlined_source_size, 600, "maximum source size in bytes considered for a single inlining") -DEFINE_INT(max_inlined_nodes, 200, +DEFINE_INT(max_inlined_nodes, 196, "maximum number of AST nodes considered for a single inlining") -DEFINE_INT(max_inlined_nodes_cumulative, 3000, +DEFINE_INT(max_inlined_nodes_cumulative, 400, "maximum cumulative number of AST nodes considered 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") diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 57be6b4051..7291bd1786 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -7885,7 +7885,9 @@ bool HOptimizedGraphBuilder::TryInline(Handle target, } // We don't want to add more than a certain number of nodes from inlining. - if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, + // Always inline small methods (<= 10 nodes). + if (nodes_added > 10 && + inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, kUnlimitedMaxInlinedNodesCumulative)) { TraceInline(target, caller, "cumulative AST node limit reached"); return false;