[PATCH] D26869: [LV] Add flag for ignoring target info

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 08:56:48 PST 2016


anemet added a comment.

In https://reviews.llvm.org/D26869#603933, @mkuper wrote:

> In https://reviews.llvm.org/D26869#603921, @anemet wrote:
>
> > > Also there is actual shift of how tests should be written now.  I think that we all got used to writing these tests by forcing the vectorization and interleave factors.
> >
> >
>
>
> I think most tests will still want to provide explicit vectorization and interleave factors, because we usually want to force vectorization with a specific factor, as opposed to "do the default thing, whatever it happens to be".


Sure I mean that there is a new option (-loop-vectorize-ignore-target-info) that probably most new tests need to add.

>>> Do you have an opinion on the concept itself, other than "circulate more widely"?
>> 
>> I haven't been following the review closely where this came up so I didn't understand the rational and the summary does not really explain how the current practice breaks down.   I am assuming we want to write target-indepedent tests but the vectorizer needs a cost model.
> 
> The gist is that we now query the cost model to make predication decisions, not just determine the VF and UF.
> 
>> Why aren't we adding a forcing flag for this feature as well, just like forcing the vectorization/interleave factors?  That may make the test more explicit rather than using the default TTI.  To me that would be the generalization of the current concept.
> 
> This is exactly why I asked for additional opinions. IIRC this is what Matt originally suggested. 
>  What I'm afraid of is flag proliferation - I wouldn't want to have to add another flag to all "target-independent" tests each time we add a cost model query that affects the way the vectorized code looks (as opposed to affecting the VF and UF).

OK, so let's continue discussing this on llvm-dev.


https://reviews.llvm.org/D26869





More information about the llvm-commits mailing list