[PATCH] D31417: [OpenMP] Add support for omp simd pragmas without runtime

Graham Hunter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 29 08:51:33 PDT 2017


huntergr added a comment.

Hi Renato,

In https://reviews.llvm.org/D31417#713162, @rengolin wrote:

> I don't know much about Clang's machinery, but would it be possible to have `-fopenmp-simd` generate the same handler, but with restrictions? I fear this slight duplication could get considerably worse as we support more and more "non-RT" OMP pragmas.


Sure, I can combine the handlers and switch behaviour within that if that's preferable. The other alternative I thought of was to perform the filtering in ParseOpenMP.cpp instead, but I need to figure out how to delete or skip tokens there without cluttering up the rest of the OpenMP parsing.

I'll come up with a new version with the combined handler tomorrow.

> Alternatively, if this is for testing purposes, we have another pragma which does exactly the same thing as `omp simd`, which are the Clang vectorizer pragmas (http://llvm.org/docs/Vectorizers.html#pragma-loop-hint-directives).

This feature comes from user requests, and basically matches the functionality of other compilers (e.g. gcc).

Thanks for the comments.

-Graham


https://reviews.llvm.org/D31417





More information about the cfe-commits mailing list