[cfe-dev] [RFC] A proposal for #pragma optnone

Dario Domizioli dario.domizioli at gmail.com
Thu May 1 04:09:21 PDT 2014


On 1 May 2014 09:14, Renato Golin <renato.golin at linaro.org> wrote:

> On 1 May 2014 06:43, "C. Bergström" <cbergstrom at pathscale.com> wrote:
> > /* ignorable rant
> > No - you just listened to a select group of (important) individuals and
> > pushed this through
> > */
>
> Isn't it how *all* consensus are reached? :)
>
>
:-)
Sorry, I didn't mean to exclude anybody. To be honest, what we care about
the most is that there is consensus on the need for the feature, so the
community will be OK with having it - and that seems to have been reached.

Yours and Alex's suggestion of "#pragma clang optimize on/off" (i.e.
removing the double negative) has also the benefit of sounding similar to
MSVC which is what our multi-platform users will see the most. Considering
that we have determined that it'll be in the clang namespace we have less
concerns over compatibility, so I suppose it would be OK for other people
as well.
Is removing the double negative (but keeping the on/off based semantics) a
good compromise for everybody?

I have now looked at the code for handling pragmas in clang and it is quite
easy to extend (I'm working on a basic version of the feature and it's
almost done); furthermore I have a little layer of API in Sema to handle
the underlying implementation for a generic "range based optnone", so the
syntax will only be important for the actual PragmaHandler. I can just
change a string and flip the on/off sense and it'll be exactly the same.

Cheers,
    Dario Domizioli
    SN Systems - Sony Computer Entertainment Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140501/0395567b/attachment.html>


More information about the cfe-dev mailing list