| Index: runtime/vm/flow_graph_builder.cc
|
| diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
|
| index 833b12a2c868a3d60782241d7aa02c071172d454..d668e63c1a3dd8134a990bb4d14d4acc4f06727d 100644
|
| --- a/runtime/vm/flow_graph_builder.cc
|
| +++ b/runtime/vm/flow_graph_builder.cc
|
| @@ -2220,12 +2220,12 @@ void FlowGraphBuilder::BuildGraph(bool for_optimized, bool use_ssa) {
|
| if (for_optimized && use_ssa) {
|
| // Link instructions backwards for optimized compilation.
|
| for (intptr_t i = 0; i < block_count; ++i) {
|
| - Instruction* prev = postorder_block_entries_[i];
|
| - Instruction* current = prev->next();
|
| - while (current != NULL && !current->IsBlockEntry()) {
|
| - current->set_previous(prev);
|
| - prev = current;
|
| - current = current->next();
|
| + BlockEntryInstr* entry = postorder_block_entries_[i];
|
| + Instruction* previous = entry;
|
| + for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
|
| + Instruction* current = it.Current();
|
| + current->set_previous(previous);
|
| + previous = current;
|
| }
|
| }
|
| GrowableArray<BitVector*> dominance_frontier;
|
|
|