diff options
| author | 2022-12-08 17:02:08 +0000 | |
|---|---|---|
| committer | 2022-12-08 17:02:08 +0000 | |
| commit | 2af14ec63d24a054d51a20bfce12eb4809637770 (patch) | |
| tree | 5af83361541d131a76f6cb7482d8918bc70ba992 /compiler/optimizing/builder.cc | |
| parent | 50bf901b19ccbd0f2759b09a11b4f27e61ac0c02 (diff) | |
| parent | d2d10628dc0f947219c6b63972a53d45e334f8d6 (diff) | |
Update loop information correctly in MaybeAddExtraGotoBlocks am: d2d10628dc
Original change: https://android-review.googlesource.com/c/platform/art/+/2333185
Change-Id: Ic6d8e861231895108c1e801872c7697fbf22d400
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'compiler/optimizing/builder.cc')
| -rw-r--r-- | compiler/optimizing/builder.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 897d8b7015..c9609e0bda 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -124,12 +124,9 @@ void HGraphBuilder::MaybeAddExtraGotoBlocks() { if (NeedsExtraGotoBlock(predecessor)) { HBasicBlock* new_goto = graph_->SplitEdgeAndUpdateRPO(predecessor, exit); new_goto->AddInstruction(new (graph_->GetAllocator()) HGoto(predecessor->GetDexPc())); - - // No need to update loop info of the new block. - DCHECK(!predecessor->IsInLoop()) - << " we should only add the extra Goto blocks for Return/ReturnVoid->TryBoundary->Exit " - << "chains. In those chains, the TryBoundary of kind:exit should never be a part of a " - << "loop"; + if (predecessor->IsInLoop()) { + new_goto->SetLoopInformation(predecessor->GetLoopInformation()); + } // Update domination chain if (!predecessor->GetDominatedBlocks().empty()) { |