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

Unified Diff: runtime/vm/compiler.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: Refactored as discussed. 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
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index d9f1a537efe366f8b38790337a081f4d3e193c2e..4d81db0d9449a6685548a37337815ec9b754a975 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -307,7 +307,9 @@ static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function,
}
BlockScheduler block_scheduler(flow_graph);
- if (optimized && FLAG_reorder_basic_blocks) {
+ const bool reorder_blocks =
+ FlowGraph::ShouldReorderBlocks(function, optimized);
+ if (reorder_blocks) {
block_scheduler.AssignEdgeWeights();
}
@@ -508,7 +510,7 @@ static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function,
// Perform register allocation on the SSA graph.
FlowGraphAllocator allocator(*flow_graph);
allocator.AllocateRegisters();
- if (FLAG_reorder_basic_blocks) block_scheduler.ReorderBlocks();
+ if (reorder_blocks) block_scheduler.ReorderBlocks();
if (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized) {
FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph);

Powered by Google App Engine
This is Rietveld 408576698