[llvm-dev] [RFC] Expose user provided vector function for auto-vectorization.

Francesco Petrogalli via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 10 13:09:21 PDT 2019



> On Jun 10, 2019, at 2:52 PM, Elovikov, Andrei <andrei.elovikov at intel.com> wrote:
> 
> There might be some mis-understanding here. I suggested to use the wrapper so that the vectorizer didn't have to deal with the mapping at all. I thought of it as another way of abstracting the ABI (the first one is implementing it in TTI).

If the user function is only used in a non-autovectorization context, the wrapper generated by the FE will be left unused.

I think it is better to generate such wrapper “on demand”. 

This doesn’t mean that the logic of the mapping of the vector function ABI needs to be exposed to the vectorizer, I agree with you. It may well be exposed at the SVFS level (please refer to previous iterations of the RFC for a description of the SVFS, or wait for the upcoming new draft).

Thank you for your comments Andrei, this was a very useful exercise for me! 

Let me know if you have any other question.

Francesco


More information about the llvm-dev mailing list