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: David Carlton <carlton at kealia dot com>
- To: "Zack Weinberg" <zack at codesourcery dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 02 Dec 2003 08:57:02 -0800
- Subject: Re: Should -fcross-jumping be part of -O1?
- References: <3FC0DCD0.9000106@coyotegulch.com><20031123162248.GA336@atrey.karlin.mff.cuni.cz><3FC0EC7E.7070800@coyotegulch.com><20031123173321.GO15575@kam.mff.cuni.cz><3FC0F7A6.4010103@coyotegulch.com><20031123181903.GW15575@kam.mff.cuni.cz><3FC11F13.2090708@coyotegulch.com><877k1fmxr4.fsf@egil.codesourcery.com>
On Tue, 02 Dec 2003 00:26:07 -0800, "Zack Weinberg"
<zack@codesourcery.com> said:
> -O0 No optimization whatsoever.
> Except maybe do obviously-dead code elimination.
This is obviously a very special case, but dead code elimination
sometimes makes it difficult to write tests for GDB's test suite. And
even when working on real programs I occasionally insert dead code as
a place where I can set breakpoints. So, personally, I'd prefer that
-O0 be pretty stupid. (Though I don't mind if it's not the default.)
> -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.
One current side effect of optimization is that it enables lots of
warnings (e.g. unitialized variable detection); if we're going to list
explicit goals for different optimization levels, I would have that be
a goal for -O1 (and of course for higher optimization levels).
> I do not think it is appropriate to exclude optimizations from any
> level just because they mess up debugging info
I disagree with this for -O0.
David Carlton
carlton@kealia.com