[PATCH] D106580: [LoopFlatten] Use SCEV and Loop APIs to identify increment and trip count
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 08:46:26 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:109
+ // Loop induction variable must start at zero and increment with a step size
+ // of one.
----------------
This is just a limitation to keep the implementation simpler at the moment right? Might be worth clarifying in the comment.
================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:160
+ // increment variable.
+ Increment =
+ dyn_cast<BinaryOperator>(InductionPHI->getIncomingValueForBlock(Latch));
----------------
Is later code somewhere relying that the increment is an add instruction? What if it is something like an extend?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106580/new/
https://reviews.llvm.org/D106580
More information about the llvm-commits
mailing list