From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4567 invoked by alias); 23 Apr 2002 00:39:56 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4247 invoked from network); 23 Apr 2002 00:39:05 -0000 Received: from unknown (HELO Angel.zoy.org) (12.236.86.18) by sources.redhat.com with SMTP; 23 Apr 2002 00:39:05 -0000 Received: by Angel.zoy.org (Postfix, from userid 1000) id 135C0B8BC; Mon, 22 Apr 2002 17:39:05 -0700 (PDT) Date: Mon, 22 Apr 2002 17:42:00 -0000 From: Michel LESPINASSE To: Andreas Jaeger Cc: Jan Hubicka , gcc list Subject: Re: GCC performance regression - up to 20% ? Message-ID: <20020423003904.GA26890@zoy.org> References: <20020421005718.GA16378@zoy.org> <20020421113238.GC16602@atrey.karlin.mff.cuni.cz> <20020422061937.GA27171@zoy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-SW-Source: 2002-04/txt/msg01126.txt.bz2 On Mon, Apr 22, 2002 at 09:10:55AM +0200, Andreas Jaeger wrote: > You might want to use the always_inline function attribute for your > inline functions in 3.1. It makes the inlining unconditional. Thanks, that suggestion does solve my inlining problem. I think the documentation for this option is a bit confusing: it says "For functions declared inline, this attribute inlines the function even if no optimization level was specified." which is true I guess, but the documentation does not mention that when optimization is enabled gcc will not always inline functions declared inline, unless we use this attribute. Also I want to point out that this is a new behaviour, as gcc up to 3.0.4 apparently always inlined functions declared inline (when compiling with -O2 at least). I think either the documentation of always_inline should be made more clear, or the inline keyword should be made to behave like always_inline when optimizing with -O2 and above (as it did previously). -- Michel "Walken" LESPINASSE Is this the best that god can do ? Then I'm not impressed.