| Index: runtime/vm/flow_graph_compiler.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler.cc (revision 37078)
|
| +++ runtime/vm/flow_graph_compiler.cc (working copy)
|
| @@ -27,6 +27,7 @@
|
| DECLARE_FLAG(bool, code_comments);
|
| DECLARE_FLAG(bool, disassemble);
|
| DECLARE_FLAG(bool, disassemble_optimized);
|
| +DECLARE_FLAG(bool, emit_edge_counters);
|
| DECLARE_FLAG(bool, enable_type_checks);
|
| DECLARE_FLAG(bool, intrinsify);
|
| DECLARE_FLAG(bool, propagate_ic_data);
|
| @@ -961,6 +962,15 @@
|
| }
|
|
|
|
|
| +bool FlowGraphCompiler::NeedsEdgeCounter(TargetEntryInstr* block) {
|
| + // Only emit an edge counter if there is not goto at the end of the block,
|
| + // except for the entry block.
|
| + return (FLAG_emit_edge_counters
|
| + && (!block->last_instruction()->IsGoto()
|
| + || (block == flow_graph().graph_entry()->normal_entry())));
|
| +}
|
| +
|
| +
|
| // Allocate a register that is not explicitly blocked.
|
| static Register AllocateFreeRegister(bool* blocked_registers) {
|
| for (intptr_t regno = 0; regno < kNumberOfCpuRegisters; regno++) {
|
|
|