Index: runtime/vm/flow_graph.cc |
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc |
index 0f6dce32ab7c86915dd9603184c6490c35e2086c..b39671b4e83f6e7d69292912a01190240bc4e4f7 100644 |
--- a/runtime/vm/flow_graph.cc |
+++ b/runtime/vm/flow_graph.cc |
@@ -60,9 +60,15 @@ void FlowGraph::AddToGuardedFields( |
} |
-GrowableArray<BlockEntryInstr*>* FlowGraph::codegen_block_order( |
+bool FlowGraph::ShouldReorderBlocks(const Function& function, |
+ bool is_optimized) { |
+ return is_optimized && FLAG_reorder_basic_blocks && !function.is_intrinsic(); |
+} |
+ |
+ |
+GrowableArray<BlockEntryInstr*>* FlowGraph::CodegenBlockOrder( |
bool is_optimized) { |
- return (is_optimized && FLAG_reorder_basic_blocks) |
+ return ShouldReorderBlocks(parsed_function().function(), is_optimized) |
? &optimized_block_order_ |
: &reverse_postorder_; |
} |