[cfe-dev] Adding a new pragma to Clang
nrotem at apple.com
Wed Jan 8 09:32:50 PST 2014
On Jan 8, 2014, at 9:16 AM, Renato Golin <renato.golin at linaro.org> wrote:
> On 8 January 2014 16:55, Hal Finkel <hfinkel at anl.gov> wrote:
> I agree that adding attributes is much easier; and I'm fine with taking this approach. I think that, in general, we should work on an infrastructure that lets the pragma parsing build off of the attribute handing. I don't see any real reason to have separate code paths for the two (in those cases where they are doing similar things).
> In the long run we should, however, definitely support a pragma syntax. That is the proper, standard, way of providing these kinds of extensions in pre-C++11 languages.
> I'll add that, as I understand it, one of the original design motivations for C++11 attributes was so that extensions like OpenMP could be specified in terms of C++ attributes instead of or in addition to pragmas. I don't think the OpenMP ARB has yet acted on this, but I expect that as C++11 support is specifically addressed in upcoming versions of the OpenMP specification, we might see movement in this direction.
> This is interesting. We can add the attributes in "beta" stage, and change to closer to whatever OMP comes up, just to make things easier to users. Since this attribute is going to be only used by a handful of people for now, mostly us and tests, I think it should be ok.
I understand that adding vectorization attributes will be easier than pragmas. But, what will the syntax look like? Can someone provide a small example?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev