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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 222553002: Add flag --inlining-callee-size-threshold (80), that prevents inlining too large functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
===================================================================
--- runtime/vm/flow_graph_inliner.cc (revision 34652)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -34,6 +34,8 @@
"Always inline functions that have threshold or fewer instructions");
DEFINE_FLAG(int, inlining_callee_call_sites_threshold, 1,
"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_caller_size_threshold, 50000,
"Stop inlining once caller reaches the threshold.");
DEFINE_FLAG(int, inlining_constant_arguments_count, 1,
@@ -425,6 +427,9 @@
// Prevent methods becoming humongous and thus slow to compile.
return false;
}
+ if (instr_count > FLAG_inlining_callee_size_threshold) {
+ return false;
+ }
// 'instr_count' can be 0 if it was not computed yet.
if ((instr_count != 0) && (instr_count <= FLAG_inlining_size_threshold)) {
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698