[cfe-dev] Adding "simd" pragma to Clang
Andrey Bokhanko
andreybokhanko at gmail.com
Mon Feb 17 05:51:39 PST 2014
Renato, All,
OK -- let's start with "omp simd" and "simd" and then discuss (in separate
thread(s)) / implement other pragmas later.
Andrey
On Mon, Feb 17, 2014 at 2:01 PM, Renato Golin <renato.golin at linaro.org>wrote:
> On 15 February 2014 18:39, Renato Golin <renato.golin at linaro.org> wrote:
> > I think pragmas simd, omp and omp simd are worth implementing as
> > they're well defined in other contexts. Regarding our own new ones,
> > pragma Clang or pragma optimize could be easily implemented locally
> > until we find a better way of doing that.
>
> Folks,
>
> Just a follow-up. I've been discussing this issue on the GCC list, and
> it seems that the general feeling is the same: we should avoid old
> Intel or custom made pragmas and stick to Cilk/OMP 4 ones. For the
> internal ones (unroll, enable) we can use the old Intel ones
> (unroll/nounroll, vector/novector), so at least GCC anc ICC would be
> able to compile the same code.
>
> Andrey,
>
> The ones we could already plugin to existing metadata are:
>
> Internal ones:
> #pragma vector always == llvm.vectorizer.enable 1
> #pragma novector == llvm.vectorizer.enable 0
> ex: test/Transforms/LoopVectorize/X86/metadata-enable.ll
>
> #pragma unroll N == llvm.vectorizer.unroll N
> #pragma nounroll == llvm.vectorizer.unroll 1
> ex: test/Transforms/LoopVectorize/metadata-unroll.ll
>
> Cilk:
> #pragma simd vectorlength N == llvm.vectorizer.width N
> ex: test/Transforms/LoopVectorize/metadata-width.ll
>
>
> cheers,
> --renato
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140217/bb66f7cd/attachment.html>
More information about the cfe-dev
mailing list