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

Side by Side Diff: runtime/vm/flow_graph_optimizer.cc

Issue 557413002: Merge chains of straight-line blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/flow_graph.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 9097 matching lines...) Expand 10 before | Expand all | Expand 10 after
9108 9108
9109 // Replace the false target entry with the new join entry. We will 9109 // Replace the false target entry with the new join entry. We will
9110 // recompute the dominators after this pass. 9110 // recompute the dominators after this pass.
9111 join->LinkTo(next); 9111 join->LinkTo(next);
9112 branch->UnuseAllInputs(); 9112 branch->UnuseAllInputs();
9113 } 9113 }
9114 } 9114 }
9115 } 9115 }
9116 9116
9117 graph_->DiscoverBlocks(); 9117 graph_->DiscoverBlocks();
9118 graph_->MergeBlocks();
9118 GrowableArray<BitVector*> dominance_frontier; 9119 GrowableArray<BitVector*> dominance_frontier;
9119 graph_->ComputeDominators(&dominance_frontier); 9120 graph_->ComputeDominators(&dominance_frontier);
9120 9121
9121 if (FLAG_trace_constant_propagation) { 9122 if (FLAG_trace_constant_propagation) {
9122 OS::Print("\n==== After constant propagation ====\n"); 9123 OS::Print("\n==== After constant propagation ====\n");
9123 FlowGraphPrinter printer(*graph_); 9124 FlowGraphPrinter printer(*graph_);
9124 printer.PrintBlocks(); 9125 printer.PrintBlocks();
9125 } 9126 }
9126 } 9127 }
9127 9128
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
10075 10076
10076 // Insert materializations at environment uses. 10077 // Insert materializations at environment uses.
10077 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 10078 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
10078 CreateMaterializationAt( 10079 CreateMaterializationAt(
10079 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); 10080 exits_collector_.exits()[i], alloc, alloc->cls(), *slots);
10080 } 10081 }
10081 } 10082 }
10082 10083
10083 10084
10084 } // namespace dart 10085 } // namespace dart
OLDNEW
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/flow_graph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698