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

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 14:40:15 PDT 2016


mssimpso added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:316
@@ -314,2 +315,3 @@
     MinBWs = &MinimumBitWidths;
+    ValuesNotWidened = &VecValuesToIgnore;
     Legal = L;
----------------
anemet wrote:
> 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.
I think a follow-on is the way to go. I briefly looked at this, and there may be quit a bit to untangle. The cost model and legality have a lot of overlap, and we will want to be sure we don't unnecessarily duplicate anything.


http://reviews.llvm.org/D21620





More information about the llvm-commits mailing list