Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

Arjan van de Ven
2005-12-29T18:45:24Z

On Thu, 2005-12-29 at 19:42 +0100, Arjan van de Ven wrote:
> >
> > One thing we could do: I think modern gcc's at least have an option to
> > warn when they don't inline something. It might make sense to just enable
> > that warning, and see _which_ functions -Os and -funit-at-a-time say are
> > too large to be inlined.
>
>
> with -Os gcc gets a bit picky and warns a LOT; with -O2... you get the
> following fixes (all huge functions)
>

btw this caught one bug that the forced attribute was hiding: there was
a function which was "inline" and which uses a variable sized array.
normally gcc refuses to inline that (rightfully; esp relative addressing
gets rather really complex in that scenario), but the force attribute
causes it to be inlined anyway. No idea if the result is sane in that
case...