[PATCH] D27919: [Loop Vectorizer] Interleave vs Gather - in some cases Gather is better.

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 10:31:27 PST 2016


mkuper added inline comments.


================
Comment at: ../../ver4/lib/Transforms/Vectorize/LoopVectorize.cpp:7052
+      // becomes better.
+      if (InterleaveFactor > TTI.getMaxInterleaveFactor(VF) &&
+          Legal->isLegalGatherOrScatter(I)) {
----------------
mssimpso wrote:
> mkuper wrote:
> > Aren't we already checking this in selectInterleaveCount()?
> > How do we end up with interleave factors above MaxInterleaveFactor in the first place?
> Ah, our naming conventions have confused this somewhat, I think. TTI.getMaxInterleaveFacor is the hook for the max unroll factor ("interleaving"). I think Elana was wanting TLI.getMaxSupportedInterleaveFactor instead. This is the hook for determining the max factor of the interleaved access groups.
Argh, right.
Sorry for the stupid question, I just looked at this and went "this looks odd" without actually reading the context. But yes, Elena, you want the other function.

Regardless, can we maybe change the naming to something sane? As a separate patch, of course. (I don't have any good ideas, though.) 


Repository:
  rL LLVM

https://reviews.llvm.org/D27919





More information about the llvm-commits mailing list