| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index 0b3b515afa5ee42dd889e07dfb2ffff7a07f052f..d6a72b70223cdf433e4fd3a12feae5437f1129ff 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -3274,10 +3274,6 @@ class LoadOptimizer : public ValueObject {
|
| Definition* replacement = (*pred_out_values)[expr_id]->Replacement();
|
| Value* input = new Value(replacement);
|
| phi->SetInputAt(i, input);
|
| -
|
| - // TODO(vegorov): add a helper function to handle input insertion.
|
| - input->set_instruction(phi);
|
| - input->set_use_index(i);
|
| replacement->AddInputUse(input);
|
| }
|
|
|
| @@ -4270,9 +4266,7 @@ void ConstantPropagator::Transform() {
|
| for (intptr_t phi_idx = 0; phi_idx < phis->length(); ++phi_idx) {
|
| PhiInstr* phi = (*phis)[phi_idx];
|
| if (phi == NULL) continue;
|
| - Value* input = phi->inputs_[pred_idx];
|
| - input->set_use_index(live_count);
|
| - phi->inputs_[live_count] = input;
|
| + phi->SetInputAt(live_count, phi->InputAt(pred_idx));
|
| }
|
| }
|
| ++live_count;
|
| @@ -4280,7 +4274,7 @@ void ConstantPropagator::Transform() {
|
| for (intptr_t phi_idx = 0; phi_idx < phis->length(); ++phi_idx) {
|
| PhiInstr* phi = (*phis)[phi_idx];
|
| if (phi == NULL) continue;
|
| - phi->inputs_[pred_idx]->RemoveFromUseList();
|
| + phi->InputAt(pred_idx)->RemoveFromUseList();
|
| }
|
| }
|
| }
|
|
|