This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -fcross-jumping be part of -O1?
- From: neroden at twcny dot rr dot com (Nathanael Nerode)
- To: zack at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: Wed, 3 Dec 2003 12:23:06 -0500
- Subject: Re: Should -fcross-jumping be part of -O1?
Zack wrote:
>My suggested constellation of -O switches:
>
>-O0 No optimization whatsoever.
> Except maybe do obviously-dead code elimination.
>-O1 Optimize, but speed of compilation is more important than
> speed or size of generated code. Possibly this, not -O0,
> should be the default mode.
>
>-O3/-Ospeed
> Optimize for speed at the expense of size.
>-Os/-Osize
> Optimize for size at the expense of speed.
>-O2/-Obalanced
> Produce a balance of speed and size optimizations acceptable
> for most code.
I must agree with these choices. :-)
>Two factors that are *not* considered in any of these switches are
>ease of debugging, and scope (function/unit/program) of optimization.
>I do not think it is appropriate to exclude optimizations from any
>level just because they mess up debugging info,
I slightly disagree. I think optimizations which mess up debugging info
should be excluded from -O0 always. One of the primary purposes of "not
optimizing" is making debugging easier. I think messing up debugging info
should be allowed for all other optimization levels, though.
> and scope of
>optimization is a detail that shouldn't be exposed at the level of
>these switches. If it makes sense in terms of the speed/size/compile
>speed tradeoffs to do whole-program optimization at -O1 then we should
>do it at -O1. We can have -f switches for that.
I agree.
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html