This is the mail archive of the
mailing list for the GCC project.
Re: Faster compilation speed
- From: Stan Shebs <shebs at apple dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 09 Aug 2002 14:50:20 -0700
- Subject: Re: Faster compilation speed
- References: <A7A86732-ABCC-11D6-A36D-000393941EE6@apple.com>
Mike Stump wrote:
I think it suffices to have -O0 mean "go as fast as possible". From time to
The first realization I came to is that the only existing control for
such things is -O, and having thought about it, I think it would
be best to retain and use those flags. For minimal user impact, I
think it would be good to not perturb existing users of -O too
much, or at leaast, not at first. If we wanted to change them, I
think -O0 should be the `fast' version, -O1 should be what -O0 does
now with some additions around the edges, and -O2 and -O3 also slide
over (at least one). What do you think, slide them all over one or
more, or just make -O0 do less, or...? Maybe we have a -O0.0 to mean
compile very quickly?
time, I've noticed that there's been a temptation to try to sneak in a
optimization even at -O0, presumably with the assumption that the time
penalty was negligible. (There are users who complain that -O0 should
do some amount of optimization, but IMHO we should ignore them.)
An optimization level meaning "almost no optimization" seems like
it's asking for user confusion. They're already confused about the
three levels we have now...
Another question would be how many knobs should we have? At first, I
am inclined to say just one. If we want, we can later break them out
into more choices. I am mainly interested in a single knob at this point.
I'd rather not have any additional knobs. Does anybody think that -O0
should *not* mean "do as little work as is consistent with correctness"?