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

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: 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/code_patcher_x64.cc ('k') | runtime/vm/flow_graph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index a4ab7b5c1723910ca98bbe62cca5b18f3be4d4ce..5a9ff9d56fcb8551141824feac03575d22fb596d 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);
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/flow_graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698