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]
Other format: [Raw text]

Re: [PATCH] Restore disregarding inlining limits for extern inline functions


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


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