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: Faster compilation speed


Mike Stump wrote:


The first realization I came to is that the only existing control for such things is -O[123], 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[0123] 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?
I think it suffices to have -O0 mean "go as fast as possible". From time to
time, I've noticed that there's been a temptation to try to sneak in a little
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"?

Stan





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