This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to allow targets to prevent inlining


 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]