[cfe-dev] Adding a new pragma to Clang

Andrey Bokhanko andreybokhanko at gmail.com
Wed Feb 5 04:27:03 PST 2014


Renato,

On Wed, Feb 5, 2014 at 4:09 PM, Renato Golin <renato.golin at linaro.org>wrote:

As far as I can get it from here:

>
> http://software.intel.com/en-us/node/462948
> http://software.intel.com/en-us/node/462942
>
> It does provide some, but not all of the features we need. Or maybe the
> doc was too poor to explain the whole thing...
>

It is better to refer to the official OpenMP 4.0 spec (
http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf, pg. 68) -- though I'm
pretty sure the explanation is pretty similar.

I agree -- "omp simd" pragma doesn't cover everything you proposed
(certainly has nothing to do with unrolling). However, it is a part of an
accepted and widely used standard. Thus, if we (meaning the whole
community) want to introduce a method to control vectorization that we
advocate to be employed by end users and not as a debug tool by llvm
developers, this is, IMHO, the way to go.


>
> The only one I thought it could be used directly is the safelen(n), but we
> still don't have safety metadata for loops in the back-end.
>
> I don't know how we could use those pragmas to control width and unroll
> factors, but I'm assuming that the existence of the pragma is the same as
> our "vectorize enable", however, there isn't a way to "disable" the
> vectorizer on a specific loop where the compiler does a bad job.
>
> Anyway, I don't mind having the support for our metadata on different
> pragmas (or C++11 annotations)...
>

If you volunteer to do code review, we can prepare patches (that implement
"omp simd" and rely on back-end support you implemented) and commit them.

Yours,
Andrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140205/197b51fc/attachment.html>


More information about the cfe-dev mailing list