lkml.org 
[lkml]   [2006]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 00/2] improve .text size on gcc 4.0 and newer compilers
On Mon, Jan 02, 2006 at 10:23:35PM +0000, Russell King wrote:
> On Mon, Jan 02, 2006 at 07:51:32PM +0100, Arjan van de Ven wrote:
> > On Mon, 2006-01-02 at 19:44 +0100, Krzysztof Halasa wrote:
> > > Ingo Molnar <mingo@elte.hu> writes:
> > >
> > > > what is the 'deeper problem'? I believe it is a combination of two
> > > > (well-known) things:
> > > >
> > > > 1) people add 'inline' too easily
> > > > 2) we default to 'always inline'
> > >
> > > For example, I add "inline" for static functions which are only called
> > > from one place.
> >
> > you know what? gcc inlines those automatic even without you typing
> > "inline". (esp if you have unit-at-a-time enabled)
>
> Rubbish it will.
>
> static void fn1(void *f)
> {
> }
>
> void fn2(void *f)
> {
> fn1(f);
> }
>
> on ARM produces:

On 3.4, 4.0, and 4.1 you only need -O for this (I just checked both x86
and ARM compilers). I believe this came in with unit-at-a-time, as
Arjan said - which was GCC 3.4.

--
Daniel Jacobowitz
CodeSourcery
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-03 05:01    [W:0.153 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site