| Index: runtime/vm/flow_graph_inliner.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_inliner.cc (revision 42168)
|
| +++ runtime/vm/flow_graph_inliner.cc (working copy)
|
| @@ -36,6 +36,8 @@
|
| "Always inline functions containing threshold or fewer calls.");
|
| DEFINE_FLAG(int, inlining_callee_size_threshold, 80,
|
| "Do not inline callees larger than threshold");
|
| +DEFINE_FLAG(int, inlining_callee_size_threshold_with_constants, 200,
|
| + "Do not inline callees larger than threshold if constant arguments");
|
| DEFINE_FLAG(int, inlining_caller_size_threshold, 50000,
|
| "Stop inlining once caller reaches the threshold.");
|
| DEFINE_FLAG(int, inlining_constant_arguments_count, 1,
|
| @@ -498,7 +500,11 @@
|
| // Prevent methods becoming humongous and thus slow to compile.
|
| return false;
|
| }
|
| - if (instr_count > FLAG_inlining_callee_size_threshold) {
|
| + if (const_arg_count > 0) {
|
| + if (instr_count > FLAG_inlining_callee_size_threshold_with_constants) {
|
| + return false;
|
| + }
|
| + } else if (instr_count > FLAG_inlining_callee_size_threshold) {
|
| return false;
|
| }
|
| // 'instr_count' can be 0 if it was not computed yet.
|
|
|