[PATCH] D116612: [LoopFlatten] Move it from LPM2 to LPM1
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 4 11:42:26 PST 2022
SjoerdMeijer added a comment.
In D116612#3220448 <https://reviews.llvm.org/D116612#3220448>, @lebedev.ri wrote:
> Does LoopFlatten not make use of SCEV?
I was expecting this question. :-)
But yes, it does. In a nutshell, we discover the induction phi, loop increment, the loop test statement, and verify with SCEV that we have found the right ones. In addition, we only allow particular uses of the induction variable for the transformation to be valid. The latter is where IndVarSimplify is causing troubles; it introduces extra uses of the IV that are unexpected for LoopFlatten. Moving LoopFlatten earlier solves this problem, and I don't see any disadvantages of doing that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116612/new/
https://reviews.llvm.org/D116612
More information about the llvm-commits
mailing list