| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index 3a79e2ab048bc09caf9e687e03cab7a9b97e543a..6cca1c246f972b725da3f51c2cca6c85d190fbba 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -410,6 +410,22 @@ void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
|
| }
|
|
|
|
|
| +void JoinEntryInstr::RemoveDeadPhis() {
|
| + if (phis_ == NULL) return;
|
| +
|
| + for (intptr_t i = 0; i < phis_->length(); i++) {
|
| + PhiInstr* phi = (*phis_)[i];
|
| + if ((phi != NULL) && !phi->is_alive()) {
|
| + (*phis_)[i] = NULL;
|
| + phi_count_--;
|
| + }
|
| + }
|
| +
|
| + // Check if we removed all phis.
|
| + if (phi_count_ == 0) phis_ = NULL;
|
| +}
|
| +
|
| +
|
| intptr_t Instruction::SuccessorCount() const {
|
| return 0;
|
| }
|
|
|