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 <jmn1ojwqw4.fsf@envy.cygnus.com>you write:
  > 
  > Nick Clifton <nickc@cygnus.com> writes:
  > 
  > > Hi Guys,
  > > 
  > >   Here is a revised patch.  It adds a new target macro called
  > >   'FUNCTION_ATTRIBUTE_INLINABLE_P' which is used by
  > >   function_cannot_inline_p to override its new default behaviour.  The
  > >   new default is to prevent inlining of functions with target specific
  > >   attributes attached.
  > 
  > Why was this chosen as the default?  Presumably all existing backends
  > work fine when such functions are inlined; at least, no-one's
  > complained.
I doubt it.  Consider interrupt, monitor or os_task functions on the H8 --
none of them can be inlined.  That's the whole point -- if the target has
tagged the function in some special way there is a very good chance it
can not be safely inlined.  Better to be safe than to require everyone that
adds a target specific attribute to also know they have to define a macro to
prevent incorrect code from being generated if someone tries to inline
such functions.

jeff



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