Re: [2.6 patch] e1000_main.c: fix inline compile errors

From: Adrian Bunk
Date: Sat Jul 17 2004 - 08:19:18 EST


On Fri, Jul 16, 2004 at 12:10:49AM +0300, Denis Vlasenko wrote:
> On Thursday 15 July 2004 23:49, Adrian Bunk wrote:
> > On Thu, Jul 15, 2004 at 11:26:40PM +0300, Denis Vlasenko wrote:
> > > On Thursday 15 July 2004 22:46, Adrian Bunk wrote:
> > > > On Thu, Jul 15, 2004 at 12:13:59PM +0300, Denis Vlasenko wrote:
> > > > >...
> > > > > As you go thru them, consider removing inline keyword for
> > > > > such large functions.
> > > > >...
> > > >
> > > > I did propose this as an alternative approach in the text that
> > > > accopagnied the patch.
> > > >
> > > > My main reason for not directly proposing to remove the inlines was the
> > > > fact that all inline functions were either very small or called only
> > > > once.
> > >
> > > I think that large inlines with one callee is overoptimization
> > > and should not be done.
> >
> > Unless I'm mistaken, it's simply equivalent to putting the code of the
> > function at the place where the only call of the function currently is?
> >
> > Or is there an additional problem I miss?
>
> Yes. New gcc do that automagically for statics.
> It'll never 'autoinline' function with multiple callers.
>...

But the way e1000_main.c is ordered, gcc can't inline such a function
(due to -fno-unit-at-a-time, even gcc 3.4 cannot).

> vda

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

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