[LLVMdev] Disabling certain optimizations at -O1?

Robinson, Paul Paul_Robinson at playstation.sony.com
Sun Dec 1 16:54:59 PST 2013


> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Evgeniy Stepanov
> Sent: Sunday, December 01, 2013 2:45 AM
> To: Renato Golin
> Cc: LLVM Developers Mailing List
> Subject: Re: [LLVMdev] Disabling certain optimizations at -O1?
> 
> Could we move this setting to function attributes?
> We already have OptimizeForSize / MinSize there, but not the other opt
> levels. We also have OptimizeNone, which seems to be completely
> unused.

Two of the three LLVM patches to implement OptimizeNone are in trunk,
the third is pending review.  Once all of the LLVM patches are in, I
will commit the Clang patch to map __attribute__((optnone)) to the
OptimizeNone IR attribute.

> This would let us support __attribute__((optimize())) in the future,
> which is currently ignored.
> Another example would be an LTO link of objects compiled with
> different optimization settings. I'm not sure if anyone would want
> this in practice.

We at least want LTO with some marked OptimizeNone.  Converting the
optimization levels to per-function attributes is a different debate.
--paulr

> 
> 
> On Thu, Nov 28, 2013 at 5:41 PM, Renato Golin <renato.golin at linaro.org>
> wrote:
> > On 28 November 2013 13:31, David Tweed <david.tweed at gmail.com> wrote:
> >> Indeed, a most of the bugs which
> >> really need a debugger are manifest in big applications where even a
> >> non-debug build can be very "not simple".)
> >
> > My example was a very crude example of simplicity. But the more
> > complex your application is, the simpler you want the compiler to be
> > for a debug session.
> >
> > cheers,
> > --renato
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev






More information about the llvm-dev mailing list