[PATCH] D152639: [LoopUnrollRuntime] Allow simple transition to deopt non-latch exit blocks

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 21:15:15 PDT 2023


yrouban created this revision.
yrouban added reviewers: anna, danilaml, fhahn, nikic.
Herald added subscribers: StephenFan, zzheng, hiraditya.
Herald added a project: All.
yrouban requested review of this revision.
Herald added a project: LLVM.

Relax condition on runtime trip count unrolling loops with 1 non-latch exit that leads to a deop block.

There are cases when the deopt blocks are common exits for different loops. LoopSimplify pass splits such edges to the common deopting blocks to make sure that all exit nodes of the loop only have predecessors that are inside of the loop (See simplifyOneLoop()). This breaks the current condition for unrolling.

This patch allows the split transitive blocks that still lead to the deopting blocks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152639

Files:
  llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
  llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152639.530269.patch
Type: text/x-patch
Size: 25179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230611/d07cf08e/attachment.bin>


More information about the llvm-commits mailing list