This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow targets to prevent inlining
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: Patch to allow targets to prevent inlining
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 21 Apr 2000 15:22:24 -0600
- cc: rearnsha at arm dot com, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200002292234.OAA24040@elmo.cygnus.com>you write:
> Cheers
> Nick
>
> 2000-02-29 Nick Clifton <nickc@cygnus.com>
>
> * integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): If not
> defined, define to return a string saying attributed functions
> cannot be inlined.
> (function_cannot_inline_p): If a function has one or more
> target specific attributes, then use the macro
> FUNCTION_ATTRIBUTE_INLINABLE_P to decide whether it can be
> inlined.
>
> * tm.texi: Add a new node 'Inlining' to document the new macro
> FUNCTION_ATTRIBUTE_INLINABLE_P.
I'd prefer to keep the message strictly in integrate.c -- mostly to avoid
having to expose the tm files to i18n issues like the "N_" stuff.
So I propose the macro only return zero or nonzero. If it returns zero
then function_cannot_inline_p returns
ie
#ifndef FUNCTION_ATTRIBUTE_INLINABLE_P
#define FUNCTION_ATTRIBUTE_INLINABLE_P(FNDECL) 0
#endif
if (DECL_MACHINE_ATTRIBUTES (fndecl)
&& ! FUNCTION_ATTRIBUTE_INLINABLE_P (fndecl))
return N_("function with target specific attribute(s) cannot be inlined");
With appropriate updates to the documentation in tm.texi.
Thoughts?
jeff