code size/ linux -fno-strength-reduce

Mark Phillips M.S.Phillips@nortel.co.uk
Wed Sep 24 03:12:00 GMT 1997


You might want to check the actual code size using size or objdump
--all-headers, maybe it is an increase in dbg size. Also check out other
peoples comments on exception handling.

The following will probably not help your code size, but may help
performance...

You may want to try dropping the -fno-strength-reduce, that option was
used to work round a long standing, major, bug in i386 code optimisation
present in gcc 2.7.2 and not fixed until 2.7.2.1 was finally released.

I have attached a test program if you want to check if egcs has the
problem....

Good Luck
Mark


Mark S. Phillips        ESN 742 2461
msp@nortel.co.uk        Tel. +44 1279 402461

On Tue, 23 Sep 1997, Thomas Koenig wrote:

> I recently compiled the 2.0.31-pre10 Linux i386 kernel egcs 970917, and
> I noted an increase in object code size against compliation with gcc
> 2.7.2.1
> 
> For example, ~linux/drivers/net/3c59x.o grew from 20344 to 26308 bytes,
> and ~linux/net/ipv4.o from 126775 to 179663 bytes.  Compile options were
> standard for Linux, i.e. "-O2 -fomit-frame-pointer -fno-strength-reduce
> -pipe -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2".
> 
> Any idea what's causing this?  Are the options wrong?
> -- 
> Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
> The joy of engineering is to find a straight line on a double
> logarithmic diagram.
> 


More information about the Gcc mailing list