[PATCH] D73058: [LoopRotate] add ability repeat loop rotation until non-deoptimizing exit is found
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 11:03:40 PST 2020
fedor.sergeev created this revision.
fedor.sergeev added reviewers: skatkov, asbirlea, reames, fhahn.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
In case of loops with multiple exit where all-but-one exit are deoptimizing
it might happen that the first rotation will end up with latch having a deoptimizing
exit. This makes the loop unsuitable for trip-count analysis (say, getLoopEstimatedTripCount)
as well as for loop transformations that know how to handle multple deoptimizing exits.
It pretty much means that canonical form in multple-deoptimizing-exits case should be
with non-deoptimizing exit at latch.
Teach loop-rotation to reach this canonical form by repeating rotation.
-loop-rotate-multi option introduced to control this behavior, currently enabled by default.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73058
Files:
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
llvm/test/Transforms/LoopRotate/multiple-deopt-exits.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73058.239174.patch
Type: text/x-patch
Size: 10718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/0ad0da0c/attachment.bin>
More information about the llvm-commits
mailing list