| Index: runtime/vm/flow_graph_allocator.cc
|
| diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
|
| index 0b5998270b467542e4f806d47a111637419b14da..73cda77f58748d43ae337014b161f4c1a4da1674 100644
|
| --- a/runtime/vm/flow_graph_allocator.cc
|
| +++ b/runtime/vm/flow_graph_allocator.cc
|
| @@ -127,6 +127,19 @@ void FlowGraphAllocator::ComputeInitialSets() {
|
| if (phi == NULL) continue;
|
| kill->Add(phi->ssa_temp_index());
|
| live_in->Remove(phi->ssa_temp_index());
|
| +
|
| + // If phi-operand is not defined by a predecessor it must be marked
|
| + // live-in for a predecessor.
|
| + for (intptr_t k = 0; k < phi->InputCount(); k++) {
|
| + Value* val = phi->InputAt(k);
|
| + if (val->IsUse()) {
|
| + BlockEntryInstr* pred = block->PredecessorAt(k);
|
| + const intptr_t use = val->AsUse()->definition()->ssa_temp_index();
|
| + if (!kill_[pred->postorder_number()]->Contains(use)) {
|
| + live_in_[pred->postorder_number()]->Add(use);
|
| + }
|
| + }
|
| + }
|
| }
|
| }
|
| }
|
|
|