This is the mail archive of the
mailing list for the GCC project.
Re: -O2 versus -O1 (Was: Re: GCSE store motion)
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: degger at fhm dot edu, gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Fri, 17 May 2002 11:40:31 +0100
- Subject: Re: -O2 versus -O1 (Was: Re: GCSE store motion)
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.
Hmm, -Og might be a better name. In particular it would be useful if such
a mode inhibited optimizations that blurred statement boundaries, so
a = 1;
would display correct results after each statement was executed. 'a'
could still be put in a register though.