Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
| index ea356b3855c1a15f8f7976c31952d4ba4a1455d3..4f8c749dbcd83f9a486e5f9babbca7449cb1df29 100644 |
| --- a/runtime/vm/flow_graph_optimizer.cc |
| +++ b/runtime/vm/flow_graph_optimizer.cc |
| @@ -2229,29 +2229,19 @@ void RangeAnalysis::RenameDominatedUses(Definition* def, |
| Instruction* dom, |
| Definition* other) { |
| Value* next_use = NULL; |
| - Value* prev_use = NULL; |
| for (Value* use = def->input_use_list(); |
| use != NULL; |
| use = next_use) { |
| next_use = use->next_use(); |
| // Skip dead phis. |
| - if (use->instruction()->IsPhi() && |
| - !use->instruction()->AsPhi()->is_alive()) { |
| - prev_use = use; |
| - continue; |
| - } |
| + PhiInstr* phi = use->instruction()->AsPhi(); |
| + if ((phi != NULL) && !phi->is_alive()) continue; |
| if (IsDominatedUse(dom, use)) { |
| - if (prev_use != NULL) { |
| - prev_use->set_next_use(next_use); |
| - } else { |
| - def->set_input_use_list(next_use); |
| - } |
| + use->RemoveFromInputUseList(); |
|
Kevin Millikin (Google)
2013/01/31 12:44:54
In another change, I will create a single operatio
|
| use->set_definition(other); |
| use->AddToInputUseList(); |
| - } else { |
| - prev_use = use; |
| } |
| } |
| } |