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: New GCC releases comparison and comparison of GCC4.4 and LLVM2.5 on SPEC2000


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Tue, 12 May 2009, Chris Lattner wrote:
>
>> 1. I have a hard time understanding the code size numbers.  Does 10% mean that
>> GCC is generating 10% bigger or 10% smaller code than llvm?
>
> I have a different comment on the code size numbers: could we have 
> comparisons of code size for -Os rather than (or in addition to) -O2 and 
> -O3?  If someone is particularly concerned with code size, -Os is what 
> they are expected to use.

It's a slippery slope that -O2 is getting so bad regarding
code size.  What should people do who need performance, but cannot
completely disregard code size (and can't use profile feedback for
some reason).

Also with limited caches code size for large programs typically tends
to affect performance too.

In my experience -Os has some significant drawbacks because it
prioritizes everything code size over everything else. For example one
-Os problem case we ran into was on x86 it always uses a fully generic
hardware division when dividing by constant even for cases where you
can generate a much faster sequence by spending a few more bytes.
Also it disables a lot of other useful optimizations.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.


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