diff options
author | 2017-06-28 22:33:32 +0000 | |
---|---|---|
committer | 2017-06-28 22:33:32 +0000 | |
commit | 76754cc816af46b41a8d1f419a38334b5db59b6e (patch) | |
tree | 9a04d4a9811c5f196b29c144875a57818e8815d9 /compiler/optimizing/nodes.h | |
parent | 3dc94c4763ecab28c0053d5d07e332c61a3f781b (diff) | |
parent | f57c1ae3682f95e6d7ce08ae4c241d04b09de658 (diff) |
Merge "Prevent loop optimization in debuggable mode."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index ffa16dd787..b21c4a5aa7 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2612,6 +2612,16 @@ class HPhi FINAL : public HVariableInputSizeInstruction { && other->AsPhi()->GetRegNumber() == GetRegNumber(); } + bool HasEquivalentPhi() const { + if (GetPrevious() != nullptr && GetPrevious()->AsPhi()->GetRegNumber() == GetRegNumber()) { + return true; + } + if (GetNext() != nullptr && GetNext()->AsPhi()->GetRegNumber() == GetRegNumber()) { + return true; + } + return false; + } + // Returns the next equivalent phi (starting from the current one) or null if there is none. // An equivalent phi is a phi having the same dex register and type. // It assumes that phis with the same dex register are adjacent. |