Re: [PATCH] Inline vfat_strnicmp()

From: Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Date: Thu Jul 31 2003 - 09:06:42 EST


On 31 July 2003 16:52, OGAWA Hirofumi wrote:
> Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> writes:
>
> > On 27 July 2003 19:33, OGAWA Hirofumi wrote:
> > > Ren <l.s.r@web.de> writes:
> > >
> > > > the function vfat_strnicmp() has just one callsite. Inlining it
> > > > actually shrinks vfat.o slightly.
> > >
> > > Thanks. I'll submit this patch to Linus.
> >
> > Just to deinline it in some months?
> >
> > Come on, automatically inlining static functions with
> > just one callsite is a compiler's job. Don't do it.
>
> Unfortunately "gcc version 3.2.3 20030415 (Debian prerelease)"
> doesn't, at least.

Yes, but some future version would.

Since there is no substantial wins in hunting down
such statics, and there is some risk of code bloat when
big inlined statics get called from more that one callsite,
and it will be automatically handled by smarter compiler someday,
I think it makes perfect sense to avoid doing this.

--
vda
-
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/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:49 EST