Messages in this thread | | | Date | Wed, 13 Nov 2002 01:10:59 +0100 | From | J.A. Magallón <> | Subject | Re: Some functions are not inlined by gcc 3.2, resulting code is ugly |
| |
(sorry to answer to not-final-version mail, but didn't keep the last one. This also applies, anyway...)
On 2002.11.03 Denis Vlasenko wrote: > On 3 November 2002 14:17, Denis Vlasenko wrote: > > It seems gcc started to de-inline large functions. [...]
> diff -urN linux-2.5.45.orig/include/linux/compiler.h linux-2.5.45fix/include/linux/compiler.h > --- linux-2.5.45.orig/include/linux/compiler.h Wed Oct 30 22:43:05 2002 > +++ linux-2.5.45fix/include/linux/compiler.h Sun Nov 3 15:19:20 2002 > @@ -20,3 +20,11 @@ > __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ > (typeof(ptr)) (__ptr + (off)); }) > #endif /* __LINUX_COMPILER_H */ > + > +/* GCC 3 (and probably earlier, I'm not sure) can be told to always inline > + a function. */ > +#if __GNUC__ < 3 > +#define force_inline inline > +#else > +#define force_inline inline __attribute__ ((always_inline)) > +#endif
This should go before the #endif /* __LINUX_COMPILER_H */, isn't it ?
-- J.A. Magallon <jamagallon@able.es> \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.1 (Cooker) for i586 Linux 2.4.20-rc1-jam2 (gcc 3.2 (Mandrake Linux 9.1 3.2-3mdk)) - 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/
| |