[PATCH] D17153: [LV] Identify more induction PHIs by coercing expressions to AddRecExprs
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 09:38:01 PDT 2016
anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.
Sorry about the delay, this LGTM.
================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:296-297
@@ -293,1 +295,4 @@
+
+ static bool isInductionPHI(PHINode *Phi, PredicatedScalarEvolution &PSE,
+ InductionDescriptor &D, bool Assume = false);
----------------
Please add function comment. Would be nice to also add comment for the original function. Thanks!
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1417
@@ +1416,3 @@
+ /// Updates the vectorization state by adding \p Phi to the inductions
+ /// list. This can set \p Phi as the main main induction of the loop if
+ /// \p Phi is a better choice for the main induction than the existing one.
----------------
"main main"
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4582-4586
@@ -4573,1 +4581,7 @@
+bool LoopVectorizationLegality::addInductionPhi(PHINode *Phi,
+ InductionDescriptor ID) {
+ Inductions[Phi] = ID;
+ Type *PhiTy = Phi->getType();
+ const DataLayout &DL = Phi->getModule()->getDataLayout();
+
----------------
Please peel off the NFC part of splitting out the helper into a separate post-commit review change.
http://reviews.llvm.org/D17153
More information about the llvm-commits
mailing list