| Index: runtime/vm/flow_graph_compiler.cc
|
| diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
|
| index 6cfea3213dfc31132f3c50e87f5784277149e6cb..5ba1ab79c7963a5158cdf53abdb5b5d82311a500 100644
|
| --- a/runtime/vm/flow_graph_compiler.cc
|
| +++ b/runtime/vm/flow_graph_compiler.cc
|
| @@ -35,6 +35,8 @@ DECLARE_FLAG(bool, use_cha);
|
| DECLARE_FLAG(bool, use_osr);
|
| DEFINE_FLAG(bool, enable_simd_inline, true,
|
| "Enable inlining of SIMD related method calls.");
|
| +DEFINE_FLAG(charp, deoptimize_filter, NULL,
|
| + "Force deoptimization in named function");
|
|
|
| // Assign locations to incoming arguments, i.e., values pushed above spill slots
|
| // with PushArgument. Recursively allocates from outermost to innermost
|
| @@ -169,6 +171,14 @@ bool FlowGraphCompiler::CanOSRFunction() const {
|
| }
|
|
|
|
|
| +bool FlowGraphCompiler::ShouldDeoptimizeFunction() const {
|
| + return (is_optimizing() &&
|
| + (FLAG_deoptimize_filter != NULL) &&
|
| + (strstr(parsed_function().function().ToFullyQualifiedCString(),
|
| + FLAG_deoptimize_filter) != NULL));
|
| +}
|
| +
|
| +
|
| static bool IsEmptyBlock(BlockEntryInstr* block) {
|
| return !block->HasParallelMove() &&
|
| block->next()->IsGoto() &&
|
|
|