[PATCH] D151866: [LoopPeel] Reduce peel count for chains of invariant phis.
Joshua Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 23:52:14 PDT 2023
caojoshua created this revision.
Herald added subscribers: zzheng, hiraditya.
Herald added a project: All.
caojoshua added reviewers: jamieschmeiser, nikic, mkazantsev, anna.
Herald added a subscriber: StephenFan.
caojoshua updated this revision to Diff 527295.
caojoshua edited the summary of this revision.
caojoshua added a comment.
caojoshua updated this revision to Diff 527297.
caojoshua updated this revision to Diff 527298.
caojoshua published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Update commit msg
caojoshua added a comment.
rename variable
caojoshua added a comment.
Add another test case
If a Phi takes a previous phi in the same block as input, the phi
becomes loop invariant in the same iteration as the input.
For example, both %a and %b become loop invariant on the second
iteration:
for (...) {
%a = phi(0, %invariant)
%b = phi(1, %a)
}
The peeling with size limit test is modified to test its intended use
case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151866
Files:
llvm/lib/Transforms/Utils/LoopPeel.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-not-forced.ll
llvm/test/Transforms/LoopUnroll/peel-loop-phi-analysis.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151866.527298.patch
Type: text/x-patch
Size: 21513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230601/24a8a9c0/attachment.bin>
More information about the llvm-commits
mailing list