[PATCH] D76838: [LV][LoopInfo] Transform counting-down loops to counting-up loop
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 04:25:24 PDT 2020
Ayal added inline comments.
================
Comment at: llvm/include/llvm/Analysis/LoopInfo.h:580
/// The IndVarSimplify pass transforms loops to have a canonical induction
/// variable.
///
----------------
Following the above comment, this Analysis should rely on a previous Transformation to produce a canonical induction variable, if needed.
If this transformation is applied to a loop before deciding to vectorize it, there may be potential slowdowns when the loop remains unvectorized; so best handled independent of LV.
In terms of implementation, as far as LV is concerned, if getCanonicalInductionVariable() fails and one is to be constructed, do so by relying on SCEV::getBackedgeTakenCount() instead of pattern matching.
Cf. http://lists.llvm.org/pipermail/llvm-dev/2020-March/140433.html
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76838/new/
https://reviews.llvm.org/D76838
More information about the llvm-commits
mailing list