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

Robinson, Paul Paul_Robinson at playstation.sony.com
Mon Apr 28 15:30:53 PDT 2014


> -----Original Message-----
> From: "C. Bergström" [mailto:cbergstrom at pathscale.com]
> On 04/29/14 04:51 AM, Robinson, Paul wrote:
> >> From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-
> bounces at cs.uiuc.edu]
> >> On Behalf Of Chandler Carruth
> >>
> >> Setting aside the reasonable concerns over naming...
> >>
> >> On Mon, Apr 28, 2014 at 6:06 AM, Dario Domizioli
> <dario.domizioli at gmail.com> wrote:
> >>> Proposals like this one have not received much attention in
> >>> the past, but we are still keen to work with the community
> >>> on this.
> >> This doesn't seem accurate.
> >>
> >> When the optnone stuff was first discussed, the use of a pragma
> >> *was* discussed, and there were arguments against it because
> >> the semantics are highly confusing: it only has effect on the
> >> function definitions which are started after the pragma. This is
> >> confusing as you might start the pragma *inside* a function
> >> definition. Such a pragma might even have semantic impact by
> >> disabling optimizations within the body of lambda, but *not*
> >> within any surrounding expressions.
> > You seem to be objecting to a different proposal.
> Others may be rejecting something else, but I'm clear. This stinks -

Chandler was setting aside the naming part, and objecting to other
aspects of the proposal that were not actually in the proposal.
As well as generally rejecting the notion of pragma at all, but
hopefully he'll come around.

> Lets not invent wholly new pragma

We stayed away from the existing pragmas because what we can (and
want) to do is much less than what the existing pragmas do (in
other compilers).  If people think it's better to use exactly the
existing syntax, and fail to support all of what they do, that's
okay with us (if I'm remembering the internal discussions correctly).


> ------------
> My voice counts for nothing around here, but I would however +1|
> 
> #pragmaoptimize level=0|
> or even
> #pragma OPTIMIZE OFF
> ---------
> |
> Is there any reason that wouldn't be sufficient for your needs?
> -------
> If you make a patch for the above I'll review it. It would also give the
> chance for anyone who is strongly apposed to really come up with some
> exceptional argument against it.
> 
> 
> 
> |

Dario owns this one but I'm sure he appreciates the offer!
(I'm responding here because he's in the UK and I wanted to provide
some responses during US working hours.)
--paulr






More information about the cfe-dev mailing list