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

Unified Diff: runtime/vm/flow_graph.cc

Issue 23523039: Fix the flag --reorder-basic-blocks so it works to disable reordering. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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') | no next file » | 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 36c148dc226dee8bd86c6feb353a9122ac491d10..e7f4293078ec5ed00a4272833b117e1388e05329 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -12,6 +12,7 @@
namespace dart {
+DECLARE_FLAG(bool, reorder_basic_blocks);
DECLARE_FLAG(bool, trace_optimization);
DECLARE_FLAG(bool, verify_compiler);
DEFINE_FLAG(bool, optimize_try_catch, true, "Optimization of try-catch");
@@ -41,6 +42,14 @@ FlowGraph::FlowGraph(const FlowGraphBuilder& builder,
}
+GrowableArray<BlockEntryInstr*>* FlowGraph::codegen_block_order(
+ bool is_optimized) {
+ return (is_optimized && FLAG_reorder_basic_blocks)
+ ? &optimized_block_order_
+ : &reverse_postorder_;
+}
+
+
ConstantInstr* FlowGraph::GetConstant(const Object& object) {
// Check if the constant is already in the pool.
GrowableArray<Definition*>* pool = graph_entry_->initial_definitions();
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698