[llvm-dev] [cfe-dev] [RFC] Expose user provided vector function for auto-vectorization.
Francesco Petrogalli via llvm-dev
llvm-dev at lists.llvm.org
Fri May 31 11:40:45 PDT 2019
> On May 31, 2019, at 1:26 PM, Renato Golin <rengolin at gmail.com> wrote:
> On Fri, 31 May 2019 at 18:38, Francesco Petrogalli
> <Francesco.Petrogalli at arm.com> wrote:
>> “The execution of the function or subroutine cannot have any side effects that would alter its execution for concurrent iterations of a SIMD chunk."
> Right, but this is a clang-based directive, not an OMP one, so we
> should extend the same guarantees explicitly. I think following OMP's
> restrictions in our own document is the right way to go.
Yep, you have spotted a problem in my RFC!
I wanted to pass exactly the message of following the same OpenMP restriction, but as I re-read the RFC I couldn’t find a reference to this.
All I said is:
> The directive `#pragma clang declare variant` follows the syntax of the
> `#pragma omp declare variant` directive of OpenMP.
> We define the new directive in the `clang` namespace instead of using
> the `omp` one of OpenMP to allow the compiler to perform
> auto-vectorization outside of an OpenMP SIMD context.
> The mechanism is base on OpenMP to provide a uniform user experience
> across the two mechanism, and to maximise the number of shared
> components of the infrastructure needed in the compiler frontend to
> enable the feature.
I will be specific on the restrictions too. Thank you.
More information about the llvm-dev