[PATCH] D21620: [LV] Don't widen trivial induction variables

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 11:14:24 PDT 2016


anemet added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:316
@@ -314,2 +315,3 @@
     MinBWs = &MinimumBitWidths;
+    ValuesNotWidened = &VecValuesToIgnore;
     Legal = L;
----------------
mssimpso wrote:
> anemet wrote:
> > Since you're holding on to this in a member, it's less surprising if the reference is live throughout the lifetime of the InnerLoopVectorizer.  I think that we should pass this in the ctor.  I see no particular reason not to do this way.
> Would it make sense to just pass the Cost Model in the ctor? MinimumBitWidths comes from there as well. Actually, I'm not sure why we don't pass the Legality in the ctor either.
Good point.  If you prefer you can leave VecValuesToIgnore as it is for now and clean all this up in follow-on patches.


http://reviews.llvm.org/D21620





More information about the llvm-commits mailing list