This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -O2 versus -O1 (Was: Re: GCSE store motion)

<<What about simply disabling any problematic optimisation when -g is
supplied? It doesn't make sense to me to have another debugging flag
being "-O1".

We never want -g to affect the generated code. Actually what I would like
to see (I mentioned this before is a -O.5 which would do all optimizations
that did not affect debugging). One of the problems with GCC is that -O0 is
really terrible, much worse than other compilers in "no optimize" mode. That's
a problem for two reasons.

A substantial set of users is permanently set against optimization, either
because they are doing safety critical work (where no optimization is one
religeon adhered to), or because they have been burned in the past. Or they
are doing benchmarks against another compiler where optimziation does not
work and they think this is the fair way to do it.

Losing debugging information is a problem, and the trouble with -O0 is not
just the speed, but more importantly the huge size of executables.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]