[PATCH] D11901: [TTI] Add a hook for specifying per-target defaults for Interleaved Accesses

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 06:47:29 PDT 2015


sbaranga added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:3886
@@ +3885,3 @@
+  // If an override option has been passed in for interleaved accesses, use it.
+  if (EnableInterleavedMemAccesses.getNumOccurrences() > 0)
+    UseInterleaved = EnableInterleavedMemAccesses;
----------------
rengolin wrote:
> sbaranga wrote:
> > rengolin wrote:
> > > sbaranga wrote:
> > > > rengolin wrote:
> > > > > Why the use of getNumOccurrences?
> > > > We want to use EnableInterleavedMemAccess only when the user has specified this option on the command line, otherwise we want to use the target defaults.
> > > > 
> > > > As far as I can tell, we need to use getNumOccurences to do that.
> > > But EnableInterleavedMemAccess is a boolean, so just using it as before should work, no?
> > > 
> > >     if (EnableInterleavedMemAccesses ||
> > >         TTI->enableInterleavedAccessVectorization())
> > >       InterleaveInfo.analyzeInterleaving(Strides);
> > I think the behaviour here is slightly different. With the above implementation you wouldn't be able to disable interleaved accesses for targets which have enabled it by default. On the other hand, we could when using getNumOccurences.
> So, setting -no-enable-interleaved-mem-accesses would make that count to zero?
Should -no-enable-interleaved-mem-accesses work?

I thought it was -enable-interleaved-mem-accesses=false, in which case the counter is 1 (and UseInterleaved is false).
And if we don't pass it in the counter is 0 and UseInterleaved is the target default.


http://reviews.llvm.org/D11901





More information about the llvm-commits mailing list