| Index: runtime/vm/flow_graph_compiler_arm.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
|
| index 1bb28294528eff35bd122d7a013c7748ff16396a..265fb3a78dd39877f1e18b4237164d72e9406261 100644
|
| --- a/runtime/vm/flow_graph_compiler_arm.cc
|
| +++ b/runtime/vm/flow_graph_compiler_arm.cc
|
| @@ -25,8 +25,6 @@ namespace dart {
|
| DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
|
| DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
|
| DEFINE_FLAG(bool, unbox_doubles, true, "Optimize double arithmetic.");
|
| -DECLARE_FLAG(int, optimization_counter_threshold);
|
| -DECLARE_FLAG(int, reoptimization_counter_threshold);
|
| DECLARE_FLAG(bool, enable_type_checks);
|
| DECLARE_FLAG(bool, enable_simd_inline);
|
|
|
| @@ -979,19 +977,16 @@ void FlowGraphCompiler::EmitFrameEntry() {
|
| // Patch point is after the eventually inlined function object.
|
| entry_patch_pc_offset_ = assembler()->CodeSize();
|
|
|
| - intptr_t threshold = FLAG_optimization_counter_threshold;
|
| __ ldr(R7, FieldAddress(function_reg,
|
| Function::usage_counter_offset()));
|
| - if (is_optimizing()) {
|
| - // Reoptimization of an optimized function is triggered by counting in
|
| - // IC stubs, but not at the entry of the function.
|
| - threshold = FLAG_reoptimization_counter_threshold;
|
| - } else {
|
| + // Reoptimization of an optimized function is triggered by counting in
|
| + // IC stubs, but not at the entry of the function.
|
| + if (!is_optimizing()) {
|
| __ add(R7, R7, Operand(1));
|
| __ str(R7, FieldAddress(function_reg,
|
| Function::usage_counter_offset()));
|
| }
|
| - __ CompareImmediate(R7, threshold);
|
| + __ CompareImmediate(R7, GetOptimizationThreshold());
|
| ASSERT(function_reg == R6);
|
| __ Branch(&stub_code->OptimizeFunctionLabel(), GE);
|
| } else if (!flow_graph().IsCompiledForOsr()) {
|
|
|