diff options
author | 2022-09-06 16:15:49 +0000 | |
---|---|---|
committer | 2022-09-06 18:05:48 +0000 | |
commit | 37fe26288aaacae0f26873131dd92704796e09ec (patch) | |
tree | 1b48127108019126390310fae57a553807830683 /compiler/optimizing/code_sinking.cc | |
parent | 0c8b0c159db65db503ada4d6ae1bc9a70adcefc9 (diff) |
Revert "Add an environment to the beginning of catch blocks"
This reverts commit f976aa822dd35496e4e936b5802af0d53d39ac95.
Reason for revert: breaking some tests https://ci.chromium.org/ui/p/art/builders/ci/angler-armv8-ndebug/3244/blamelist
Change-Id: I5c2732e81bef8a7e83b661b1b947d7c079994c1b
Diffstat (limited to 'compiler/optimizing/code_sinking.cc')
-rw-r--r-- | compiler/optimizing/code_sinking.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/compiler/optimizing/code_sinking.cc b/compiler/optimizing/code_sinking.cc index 930675b401..766bb01978 100644 --- a/compiler/optimizing/code_sinking.cc +++ b/compiler/optimizing/code_sinking.cc @@ -271,21 +271,10 @@ static HInstruction* FindIdealPosition(HInstruction* instruction, } } for (const HUseListNode<HEnvironment*>& use : instruction->GetEnvUses()) { - HEnvironment* env = use.GetUser(); - HInstruction* user = env->GetHolder(); + HInstruction* user = use.GetUser()->GetHolder(); if (user->GetBlock() == target_block && (insert_pos == nullptr || user->StrictlyDominates(insert_pos))) { - if (target_block->IsCatchBlock() && target_block->GetFirstInstruction() == user) { - // We can sink the instructions past the environment setting Nop. If we do that, we have to - // remove said instruction from the environment. Since we know that we will be sinking the - // instruction to this block and there are no more instructions to consider, we can safely - // remove it from the environment now. - DCHECK(target_block->GetFirstInstruction()->IsNop()); - env->RemoveAsUserOfInput(use.GetIndex()); - env->SetRawEnvAt(use.GetIndex(), /*instruction=*/ nullptr); - } else { - insert_pos = user; - } + insert_pos = user; } } if (insert_pos == nullptr) { |