Chromium Code Reviews| Index: runtime/vm/flow_graph.cc |
| diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc |
| index 98a774ba959d34490aafbb61b4990beaace9bcbb..7c7429a07ef5f029ead363bc213e6353a03afadd 100644 |
| --- a/runtime/vm/flow_graph.cc |
| +++ b/runtime/vm/flow_graph.cc |
| @@ -115,7 +115,8 @@ void FlowGraph::InsertAfter(Instruction* prev, |
| Definition::UseKind use_kind) { |
| if (use_kind == Definition::kValue) { |
| ASSERT(instr->IsDefinition()); |
| - instr->AsDefinition()->set_ssa_temp_index(alloc_ssa_temp_index()); |
| + Definition* defn = instr->AsDefinition(); |
| + AllocateSSAIndexes(defn); |
|
srdjan
2014/04/07 18:22:50
AllocateSSAIndexes(instr->AsDefinition()) .. also
Cutch
2014/04/08 15:56:16
Done here and elsewhere.
|
| } |
| instr->InsertAfter(prev); |
| ASSERT(instr->env() == NULL); |
| @@ -129,7 +130,8 @@ Instruction* FlowGraph::AppendTo(Instruction* prev, |
| Definition::UseKind use_kind) { |
| if (use_kind == Definition::kValue) { |
| ASSERT(instr->IsDefinition()); |
| - instr->AsDefinition()->set_ssa_temp_index(alloc_ssa_temp_index()); |
| + Definition* defn = instr->AsDefinition(); |
| + AllocateSSAIndexes(defn); |
| } |
| ASSERT(instr->env() == NULL); |
| if (env != NULL) env->DeepCopyTo(instr); |
| @@ -716,7 +718,7 @@ void FlowGraph::Rename(GrowableArray<PhiInstr*>* live_phis, |
| ASSERT(parameter_count() == inlining_parameters->length()); |
| for (intptr_t i = 0; i < parameter_count(); ++i) { |
| Definition* defn = (*inlining_parameters)[i]; |
| - defn->set_ssa_temp_index(alloc_ssa_temp_index()); // New SSA temp. |
| + AllocateSSAIndexes(defn); |
| AddToInitialDefinitions(defn); |
| env.Add(defn); |
| } |
| @@ -926,7 +928,7 @@ void FlowGraph::RenameRecursive(BlockEntryInstr* block_entry, |
| // Not a load, store, or constant. |
| if (definition->is_used()) { |
| // Assign fresh SSA temporary and update expression stack. |
| - definition->set_ssa_temp_index(alloc_ssa_temp_index()); |
| + AllocateSSAIndexes(definition); |
| env->Add(definition); |
| } |
| } |