| 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();
|
|
|