[PATCH] D123865: [LoopPeel] Allow partial unrolling for profile-based peeling
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 10:21:53 PDT 2022
ikudrin created this revision.
ikudrin added reviewers: skatkov, anemet, davidxl, mkuper, reames, ebrevnov, Ayal.
ikudrin added a project: LLVM.
Herald added subscribers: wenlei, zzheng, hiraditya.
Herald added a project: All.
ikudrin requested review of this revision.
As for now, the loop is unrolled if the profile-based trip count is not greater than a limit, which is 7 by default; i.e. no iterations are peeled off for a loop that has the estimation of 8. The patch is based on the idea that a bit longer loop can still benefit from extracting several first iterations. The longer the loop, the lower the effect of the extraction, so if the trip count is estimated to be more than twice the threshold, the optimization is not applied.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123865
Files:
llvm/lib/Transforms/Utils/LoopPeel.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-conditions-pgo-2.ll
llvm/test/Transforms/LoopUnroll/peel-loop-conditions-pgo-3.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123865.423131.patch
Type: text/x-patch
Size: 4783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220415/38a76a90/attachment.bin>
More information about the llvm-commits
mailing list