increase in object code size

Horst von Brand vonbrand@inf.utfsm.cl
Wed Sep 24 07:13:00 GMT 1997


Jason Merrill <jason@cygnus.com> said:
> >>>>> Horst von Brand <vonbrand@inf.utfsm.cl> writes:
> > Jason Merrill <jason@cygnus.com> said:
> >> This bloat can be significantly reduced by potential optimizations in the
> >> assembler.  [...]

> > Nice idea for C++/Ada!

> > And how do we get rid of it completely for the portable assembler, aka C?

> With this mechanism, we can't eliminate it and still support throwing
> through C code.  Without the unwind info, the EH runtime doesn't know how
> to unwind stack frames.  The setjmp/longjmp code avoids this problem by
> recording the necessary state, which significantly slows down C++ code that
> doesn't throw.

Who wants to throw through C can compile with g++ (or use some special
-fmagic-exception-handling-for-throwing-though-this), the bloat in C is
totally unwarranted, and gives nothing useful in return.

A quick check (I'll look at that closer tonight) makes gcc-2.90.09 generate
a xgcc that is fully 40% larger (!) than the one built by gcc-2.90.06.
Both for the same sources (egcs-970922 + patches posted here for compiling
to work on i586-pc-linuxlibc1), CFLAGS='-O2 -fomit-frame-pointer -mpentium'
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513





More information about the Gcc mailing list