Index: runtime/vm/flow_graph.cc |
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc |
index 98a774ba959d34490aafbb61b4990beaace9bcbb..bd24cf64e936e18d55d3f3816f4ae1189cf52322 100644 |
--- a/runtime/vm/flow_graph.cc |
+++ b/runtime/vm/flow_graph.cc |
@@ -115,7 +115,11 @@ 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(); |
+ defn->set_ssa_temp_index(alloc_ssa_temp_index()); |
+ if (defn->RequiresTwoSSATempIndexes()) { |
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index()); |
Vyacheslav Egorov (Google)
2014/04/03 18:10:09
I am not sure I like the naming here.
Cutch
2014/04/03 18:35:07
I've renamed it to pair_ssa_index. I don't really
|
+ } |
} |
instr->InsertAfter(prev); |
ASSERT(instr->env() == NULL); |
@@ -129,7 +133,11 @@ 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(); |
+ defn->set_ssa_temp_index(alloc_ssa_temp_index()); |
+ if (defn->RequiresTwoSSATempIndexes()) { |
Vyacheslav Egorov (Google)
2014/04/03 18:10:09
The code is duplicated in multiple places. I wonde
Cutch
2014/04/03 18:35:07
Done. Added the following to FlowGraph:
void Assi
|
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index()); |
+ } |
} |
ASSERT(instr->env() == NULL); |
if (env != NULL) env->DeepCopyTo(instr); |
@@ -717,6 +725,9 @@ void FlowGraph::Rename(GrowableArray<PhiInstr*>* live_phis, |
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. |
+ if (defn->RequiresTwoSSATempIndexes()) { |
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index()); |
+ } |
AddToInitialDefinitions(defn); |
env.Add(defn); |
} |
@@ -927,6 +938,9 @@ void FlowGraph::RenameRecursive(BlockEntryInstr* block_entry, |
if (definition->is_used()) { |
// Assign fresh SSA temporary and update expression stack. |
definition->set_ssa_temp_index(alloc_ssa_temp_index()); |
+ if (definition->RequiresTwoSSATempIndexes()) { |
+ definition->set_ssa_temp_index2(alloc_ssa_temp_index()); |
+ } |
env->Add(definition); |
} |
} |