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

Unified Diff: runtime/vm/compiler.cc

Issue 10911004: Reapply "Inlining of static calls with trivial function bodies." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 56717e0e20702bb34512805dec63c2de08f3ac09..f331f69ff80fe449eb957028b77445a263f69668 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -17,6 +17,7 @@
#include "vm/flow_graph_allocator.h"
#include "vm/flow_graph_builder.h"
#include "vm/flow_graph_compiler.h"
+#include "vm/flow_graph_inliner.h"
#include "vm/flow_graph_optimizer.h"
#include "vm/il_printer.h"
#include "vm/longjump.h"
@@ -38,6 +39,7 @@ DEFINE_FLAG(bool, cse, true, "Do common subexpression elimination.");
DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
"How many times we allow deoptimization before we disallow"
" certain optimizations");
+DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining");
DECLARE_FLAG(bool, print_flow_graph);
@@ -189,6 +191,14 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
// Compute the use lists.
flow_graph->ComputeUseLists();
+ // Inlining (mutates the flow graph)
+ if (FLAG_use_inlining) {
+ FlowGraphInliner inliner(flow_graph);
+ inliner.Inline();
+ // Verify that the use lists are still valid.
+ DEBUG_ASSERT(flow_graph->ValidateUseLists());
+ }
+
// Propagate types and eliminate more type tests.
FlowGraphTypePropagator propagator(*flow_graph);
propagator.PropagateTypes();
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698