[PATCH] D142255: [WIP] Loop peeling opportunity for identity operators
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 01:00:53 PST 2023
nikic requested changes to this revision.
nikic added reviewers: reames, mkazantsev, nikic.
nikic added a comment.
Herald added a subscriber: StephenFan.
Strong -1 on this change as implemented. There's a lot of red flags here, for example that you are trying to artificially limit this transform so as not to completely break LoopVectorize (indicating that you're breaking a canonical form), and the number of times you have to suppress the transform in tests, where it looks like the transform would be clearly non-profitable if it were actually applied.
There might be something to the general idea here, but this would need entirely different cost modelling from the current peeling transform. Loop peeling is a tradeoff between simplifying the loop body vs increasing code size. In the cases where current peeling transforms are performed, we expect some significant simplification of the loop, like the elimination of branches that are constant after some iterations. For the transform proposed here the benefit is very marginal, you're basically saving a single operation. This //might// make sense if that operation is pretty much the only thing the loop does, but not if you need to duplicate a large loop body that also does many other things.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142255/new/
https://reviews.llvm.org/D142255
More information about the llvm-commits
mailing list