gcc code bloat again
Richard Earnshaw
rearnsha@arm.com
Wed Dec 6 13:21:00 GMT 2000
>
> this is gcc 2.95.1 on arm linux
> I wonder if someone could kindly explain why gcc produces this output for
> the constructor of an object and maybe give some suggestions how to avoid
> it.
> The size of the constructor code is 300 bytes! The source compiled with
> -O2 -fomit-frame-pointer flags
> By contrast, the code produced by Metrowerks 68k compiler is 46 bytes ( see
> the disassembly below)
Without source, it's hard to be sure what is happening, but much of the
output looks to be related to using the set-jump version of exception
(re-)throwing. Try compiling the code with -fno-exceptions. How does it
compare then? Does the Metroworks compiler support exceptions?
Gcc-3 will probably use dwarf2 table-based exceptions, so the code will
probably be much tighter for your example, but without the source, I can't
demonstrate.
R.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list