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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10698153: Change comparison-to-branch fusion to actually remove comparison from the graph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index eb1ccda6c1e9a3209868f21879776b0112d518ad..dc3af0d1f86e8c1cb58c2c058df9c738303c01dc 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2259,7 +2259,8 @@ void FlowGraphBuilder::BuildGraph(bool for_optimized, bool use_ssa) {
for (intptr_t i = 0; i < block_count; ++i) {
postorder_block_entries_[i]->set_block_id(block_count - i - 1);
}
- if (for_optimized && use_ssa) {
+
+ if (for_optimized) {
// Link instructions backwards for optimized compilation.
for (intptr_t i = 0; i < block_count; ++i) {
BlockEntryInstr* entry = postorder_block_entries_[i];
@@ -2270,6 +2271,9 @@ void FlowGraphBuilder::BuildGraph(bool for_optimized, bool use_ssa) {
previous = current;
}
}
+ }
+
+ if (for_optimized && use_ssa) {
GrowableArray<BitVector*> dominance_frontier;
ComputeDominators(&preorder_block_entries_, &parent, &dominance_frontier);
InsertPhis(preorder_block_entries_,
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698