This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Restore disregarding inlining limits for extern inline functions
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 26 Aug 2007 17:57:14 +0200 (CEST)
- Subject: Re: [PATCH] Restore disregarding inlining limits for extern inline functions
- References: <Pine.LNX.4.64.0708211709020.13885@s68.fhfr.qr>
On Tue, 21 Aug 2007, Richard Guenther wrote:
>
> As $subject says.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu. I'll apply this
> tomorrow if nobody objects.
>
> Thanks,
> Richard.
>
> 2007-08-21 Richard Guenther <rguenther@suse.de>
>
> * tree-inline.c (inlinable_function_p): Restore disregarding
> inline limits for GNU extern inline functions.
Unfortunately this seems to cause quite some C++ compile-time
regressions. Does anyone know which C++ construct leads to both
DECL_DECLARED_INLINE_P and DECL_EXTERNAL set (just to have a testcase)?
I suppose the only solution is to either revert the patch, or in the
C frontend set some other flag for the GNU extern inline case. Any
ideas on what to best use here? There are bits in struct function
left, also one bit in the decl itself.
Thanks,
Richard.
>
> Index: tree-inline.c
> ===================================================================
> *** tree-inline.c (revision 127658)
> --- tree-inline.c (working copy)
> *************** inlinable_function_p (tree fn)
> *** 1920,1925 ****
> --- 1920,1930 ----
> bool
> disregard_inline_limits_p (tree fn)
> {
> + /* GNU extern inline functions are supposed to be cheap. */
> + if (DECL_DECLARED_INLINE_P (fn)
> + && DECL_EXTERNAL (fn))
> + return true;
> +
> return lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL_TREE;
> }
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex