| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index 3869329698d03e1673511807f032458ec79c6663..db2f1f60da53e4dc0aaa8f1e236626e6c8cc6d8e 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -3520,6 +3520,22 @@ bool PhiInstr::IsRedundant() const {
|
| }
|
|
|
|
|
| +bool PhiInstr::HasReplacement(Definition** replacement) const {
|
| + ASSERT(InputCount() > 1);
|
| + ASSERT(!IsRedundant());
|
| + // At least >=1 inputs are different from 'this': Check for
|
| + // v <- phi (v, v, ..., r, v, ..., v)
|
| + // where r is the replacement.
|
| + intptr_t i = 0;
|
| + while (InputAt(i)->definition() == this) ++i;
|
| + *replacement = InputAt(i)->definition();
|
| + while (++i < InputCount()) {
|
| + if (InputAt(i)->definition() != this) return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| +
|
| bool CheckArrayBoundInstr::IsFixedLengthArrayType(intptr_t cid) {
|
| return LoadFieldInstr::IsFixedLengthArrayCid(cid);
|
| }
|
|
|