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: Geoff Keating <geoffk at cygnus dot com>
- Subject: Re: Patch to allow targets to prevent inlining
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 29 Feb 2000 16:19:45 -0700
- cc: Nick Clifton <nickc at cygnus dot com>, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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