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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 17770003: Add --deoptimization_counter_inlining_threshold=10 that stops inlining in a method that has reached… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « runtime/vm/compiler.cc ('k') | 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 24518)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -19,6 +19,8 @@
namespace dart {
+DEFINE_FLAG(int, deoptimization_counter_inlining_threshold, 12,
+ "How many times we allow deoptimization before we stop inlining.");
DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining");
DEFINE_FLAG(charp, inlining_filter, NULL, "Inline only in named function");
@@ -387,6 +389,10 @@
void InlineCalls() {
// If inlining depth is less then one abort.
if (FLAG_inlining_depth_threshold < 1) return;
+ if (caller_graph_->parsed_function().function().deoptimization_counter() >=
+ FLAG_deoptimization_counter_inlining_threshold) {
+ return;
+ }
// Create two call site collections to swap between.
CallSites sites1(caller_graph_);
CallSites sites2(caller_graph_);
« no previous file with comments | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698