This adds a hook to TTI which enables us to selectively turn on by default
interleaved access vectorization for targets on which we have have performed
the required benchmarking.
Details
Diff Detail
Event Timeline
Hi Silviu,
Do you plan to enable this for ARM/AArch64 soon?
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | Why the use of getNumOccurrences? |
Hi Renato,
I think we are very close. As far as I can see we only need a slight tuning of the cost model (increase the cost of insert/extract element for both backends).
Cheers,
Silviu
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | 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. |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | But EnableInterleavedMemAccess is a boolean, so just using it as before should work, no? if (EnableInterleavedMemAccesses || TTI->enableInterleavedAccessVectorization()) InterleaveInfo.analyzeInterleaving(Strides); |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | 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. |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | So, setting -no-enable-interleaved-mem-accesses would make that count to zero? |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | 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). |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3886 | Right, makes sense. |
Why the use of getNumOccurrences?