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]

Re: (-Os versus -O2 relation) Was: case where gcc generates bigger binaries than MSVC


> Date: Fri, 12 May 2000 10:10:22 +0200
> From: Jan Hubicka <jh@suse.cz>
> To: Mike Stump <mrs@windriver.com>

> Do we wan't the -O2 code compiled together with -Os code to run
> slower because of missaligned data comming from the -Os part?  I
> still believe that decision needs to be made here first.

It would be wise to keep asking this until you hear from lots of
people.  I should have an opinion on this, but I find that I don't
have an immediate obvious answer.  comp.lang.c/comp.lang.c++ might be
a wider audience to draw from, some of them might actually write code
and use compilers.

Sorry.  I'd tend to think that we should lean more to -Os, than speed
at all costs.  I tend to think of these flags as two numbers, one
describes how long you want to spend compiling, having the compiler
trying to improve the code, and the other is how small you need it to
be.  If the compiler had profile based feedback, it would be clearer
why having two numbers would be nice.

Answering your question from this point, would mean that -O1 would
make the code smaller, and -02 should tend to make it larger, and -O3
larger yet.  Now, where exactly do we draw each line...  that _is_ the
art.

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