This is the mail archive of the gcc@gcc.gnu.org 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: Should -fcross-jumping be part of -O1?


On Wed, Dec 03, 2003 at 05:17:10PM -0800, Mike Stump wrote:
> As one of the people concerned with compilation speed, -O0 is fine.  We 
> want it to mean, go fast, easy to debug, no optimizations that slow 
> compile time, but can include optimizations that improve compile time 
> that are safe, well tested and robust. With -O2, we don't care about 
> compilation speed, well, we do, but not as much as we do about -O0.

I see no reason to demand that -O0 be completely stupid.  If we have

	var = EXPRESSION;

and EXPRESSION has ten arithmetic operations, any simplification that
assigns the correct value to var is just fine, because what matters is
that the state as seen by gdb before and after the statement is correct.

> So, unless someone wants -O0 to not include some optimizations, I think 
> status quo is fine.  From most of what I'ev seen to date on the list, 
> it would like having more optimizations (from a very limited set of all 
> optimizations) at -O0 would be fine.

Exactly.  Some have suggested having the default be an optimization level
that does a few optimizations but preserves debuggability, but keep an
-O0 that does none.  This is useless, as the -O0 is likely to be slower
(as a bunch of extra useless operations have to be converted into RTL
and then to assembler).


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