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

Reid Kleckner rnk at google.com
Tue Apr 29 12:51:48 PDT 2014


I find the debugging session and binary search use cases fairly compelling.
 It's nice to be able to change one source file and disable optimizations
without hacking the build system.

I think reducing the proliferation of pragmas is a good thing, so let's
implement the GCC syntax.  We can add support for the MSVC syntax later.
 We probably want to defer that because the primary use case for it is
working around MSVC miscompiles.

So, +1 for implementing #pragma gcc optimize 0.


On Mon, Apr 28, 2014 at 6:06 AM, Dario Domizioli
<dario.domizioli at gmail.com>wrote:

> Hi cfe-dev!
>
> Following the talk by Greg Bedwell at the EuroLLVM conference, which
> reiterated the need for a range-based solution to selectively disable
> optimizations (see
> http://llvm.org/devmtg/2014-04/PDFs/Talks/GBedwell_PS4CPUToolchain_EuroLLVM2014_distribution.pdf from
> slide 80), we are now proposing a range-based pragma that decorates
> function definitions in the range with the 'optnone' attribute.
>
> Proposals like this one have not received much attention in the past, but
> we are still keen to work with the community on this.
>
> The attached HTML file describes our intentions for the "#pragma clang
> optnone" feature. There is no implementation yet, but we think the feature
> can be easily implemented on top of the existing 'optnone' infrastructure.
> We would however like to fix things like the syntax and the semantics
> before we start working on it.
>
> We would greatly appreciate any feedback on the spec.
>
> Cheers,
>     Dario Domizioli
>     SN Systems - Sony Computer Entertainment Group
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140429/d316faa4/attachment.html>


More information about the cfe-dev mailing list