diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-14 16:46:34 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-14 16:46:34 +0000 |
| commit | ba3a790338725a37ecd4cb314c4a6147e29aef38 (patch) | |
| tree | f81b0225fa22d02e9726c743d486d314cde91893 /compiler/optimizing/nodes.cc | |
| parent | df6e7fa50734cd052c34e28128a6d2d398790072 (diff) | |
| parent | 04366f382239f4bcf1f9c67bb1ff6975607cd8e4 (diff) | |
| download | art-ba3a790338725a37ecd4cb314c4a6147e29aef38.tar.gz art-ba3a790338725a37ecd4cb314c4a6147e29aef38.tar.bz2 art-ba3a790338725a37ecd4cb314c4a6147e29aef38.zip | |
Merge "Revert "ART: Try to statically evaluate some conditions.""
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index d39c2aded5..5f33ed6303 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1111,10 +1111,10 @@ bool HInstructionList::FoundBefore(const HInstruction* instruction1, return true; } -bool HInstruction::Dominates(HInstruction* other_instruction, bool strictly) const { +bool HInstruction::StrictlyDominates(HInstruction* other_instruction) const { if (other_instruction == this) { // An instruction does not strictly dominate itself. - return !strictly; + return false; } HBasicBlock* block = GetBlock(); HBasicBlock* other_block = other_instruction->GetBlock(); @@ -1148,10 +1148,6 @@ bool HInstruction::Dominates(HInstruction* other_instruction, bool strictly) con } } -bool HInstruction::StrictlyDominates(HInstruction* other_instruction) const { - return Dominates(other_instruction, /* strictly */ true); -} - void HInstruction::RemoveEnvironment() { RemoveEnvironmentUses(this); environment_ = nullptr; @@ -1174,16 +1170,14 @@ void HInstruction::ReplaceWith(HInstruction* other) { DCHECK(env_uses_.empty()); } -void HInstruction::ReplaceUsesDominatedBy(HInstruction* dominator, - HInstruction* replacement, - bool strictly) { +void HInstruction::ReplaceUsesDominatedBy(HInstruction* dominator, HInstruction* replacement) { const HUseList<HInstruction*>& uses = GetUses(); for (auto it = uses.begin(), end = uses.end(); it != end; /* ++it below */) { HInstruction* user = it->GetUser(); size_t index = it->GetIndex(); // Increment `it` now because `*it` may disappear thanks to user->ReplaceInput(). ++it; - if (dominator->Dominates(user, strictly)) { + if (dominator->StrictlyDominates(user)) { user->ReplaceInput(replacement, index); } } |
