summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-08-09 11:54:19 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-08-09 13:21:11 +0000
commitfa1034c563b44c4f557814c50e2678e14dcd1d13 (patch)
tree6353ca19b0f193183310ad7cd77c199bce64eb18 /compiler/optimizing/nodes.cc
parent6981ef9238ce2d4ea3f7a86d3faf5d720c8c4641 (diff)
Revert "Propagating values from if clauses to its successors"
This reverts commit c6b816ceb2b35300c937ef2e7d008598b6afba21. Reason for revert: Broke libcore test https://ci.chromium.org/ui/p/art/builders/ci/angler-armv7-ndebug/3179/overview Change-Id: I4f238bd20cc485e49078104e0225c373cac23415
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 4fbb033c2f..6ac4e07ca7 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1477,10 +1477,6 @@ bool HInstructionList::FoundBefore(const HInstruction* instruction1,
UNREACHABLE();
}
-bool HInstruction::Dominates(HInstruction* other_instruction) const {
- return other_instruction == this || StrictlyDominates(other_instruction);
-}
-
bool HInstruction::StrictlyDominates(HInstruction* other_instruction) const {
if (other_instruction == this) {
// An instruction does not strictly dominate itself.
@@ -1540,19 +1536,14 @@ void HInstruction::ReplaceWith(HInstruction* other) {
DCHECK(env_uses_.empty());
}
-void HInstruction::ReplaceUsesDominatedBy(HInstruction* dominator,
- HInstruction* replacement,
- bool strictly_dominated) {
+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;
- const bool dominated =
- strictly_dominated ? dominator->StrictlyDominates(user) : dominator->Dominates(user);
-
- if (dominated) {
+ if (dominator->StrictlyDominates(user)) {
user->ReplaceInput(replacement, index);
} else if (user->IsPhi() && !user->AsPhi()->IsCatchPhi()) {
// If the input flows from a block dominated by `dominator`, we can replace it.