[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#456034: fenix: compile with -O1



On 14/12/2007, Simon Ruggier <simon80@gmail.com> wrote:
> On 12/14/07, Jon Dowland <lists@alcopop.org> wrote:
> > My understanding is that -O2 should never result in incorrect/failing
> > code and -O3 can, but I'm not sure where I get that notion frmo.
>
> I would have thought one would get it from the gcc man page, but when
> I looked, I couldn't find anything explicit.

It can be found through 'info': info gcc

Section: 3.10 Options That Control Optimization

"`-O2'
     Optimize even more.  GCC performs nearly all supported
     optimizations that do not involve a space-speed tradeoff.  The
     compiler does not perform loop unrolling or function inlining when
     you specify `-O2'.  As compared to `-O', this option increases
     both compilation time and the performance of the generated code.

     `-O2' turns on all optimization flags specified by `-O'.  It also
     turns on the following optimization flags:
          -fthread-jumps
          -fcrossjumping
          -foptimize-sibling-calls
          -fcse-follow-jumps  -fcse-skip-blocks
          -fgcse  -fgcse-lm
          -fexpensive-optimizations
          -fstrength-reduce
          -frerun-cse-after-loop  -frerun-loop-opt
          -fcaller-saves
          -fpeephole2
          -fschedule-insns  -fschedule-insns2
          -fsched-interblock  -fsched-spec
          -fregmove
          -fstrict-aliasing
          -fdelete-null-pointer-checks
          -freorder-blocks  -freorder-functions
          -falign-functions  -falign-jumps
          -falign-loops  -falign-labels
          -ftree-vrp
          -ftree-pre

     Please note the warning under `-fgcse' about invoking `-O2' on
     programs that use computed gotos.
"

Not sure if that helps.



Reply to: