From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31350 invoked by alias); 26 Aug 2007 15:50:41 -0000 Received: (qmail 31274 invoked by uid 22791); 26 Aug 2007 15:50:40 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 26 Aug 2007 15:50:35 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id C11B91241F for ; Sun, 26 Aug 2007 17:50:32 +0200 (CEST) Date: Sun, 26 Aug 2007 16:33:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Restore disregarding inlining limits for extern inline functions In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg01741.txt.bz2 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 > > * 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 Novell / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex