Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: runtime/vm/flow_graph.cc

Issue 24744002: Pattern match on generated code to find edge counters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698