[PATCH] Add support for CUDA unroll pragma

Chandler Carruth chandlerc at google.com
Mon Jun 30 09:52:13 PDT 2014


On Thu, Jun 26, 2014 at 9:49 AM, Mark Heffernan <meheff at google.com> wrote:

> From a previous review Richard Smith (cc'd) had a strong opinion about
> placing the loop pragmas inside of the clang namespace ("#pragma clang
> loop...").  Clearly this is incompatible with "#pragma unroll ...".
>  Richard, any thoughts on this?


I can't speak for Richard, but my take on it would be this:

For an invented syntax, it should go under the clang namespace.

For a syntax designed to be compatible with some other system (Intel, IBM,
or CUDA) we should match their syntax exactly, as otherwise there is no
point in "compatibility".

I'm personally very comfortable with Clang supporting a relatively diverse
set of syntaxes for specifying this behavior in order to increase
compatibility with other compilers that we would otherwise already be
compatible with (IBM and Intel seem likely) or which there are specs that
we should follow (CUDA). I would probably allow the CUDA-compatible syntax
only in CUDA mode (and similarly other compatible syntaxes if there is a
comparable narrow area where the compatibility matters), but it doesn't
seem to be a deal breaker either way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140630/1ab83454/attachment.html>


More information about the cfe-commits mailing list