From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21387 invoked by alias); 30 Jul 2003 16:50:26 -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 21380 invoked from network); 30 Jul 2003 16:50:26 -0000 Received: from unknown (HELO piper.synopsys.com) (198.182.56.5) by sources.redhat.com with SMTP; 30 Jul 2003 16:50:26 -0000 Received: (from jbuck@localhost) by piper.synopsys.com (8.11.6/8.11.6) id h6UGnrU16584; Wed, 30 Jul 2003 09:49:53 -0700 Date: Wed, 30 Jul 2003 17:06:00 -0000 From: Joe Buck To: Gabriel Dos Reis Cc: Alexandre Oliva , Steven Bosscher , Richard Guenther , gcc@gcc.gnu.org Subject: Re: std::pow implementation Message-ID: <20030730094953.B16467@synopsys.com> References: <1059481647.3651.120.camel@steven.lr-s.tudelft.nl> <1059483328.3651.144.camel@steven.lr-s.tudelft.nl> <1059487859.3650.208.camel@steven.lr-s.tudelft.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from gdr@integrable-solutions.net on Wed, Jul 30, 2003 at 06:58:24AM +0200 X-SW-Source: 2003-07/txt/msg02225.txt.bz2 Alexandre Oliva wrote: > | Consider a very complex function > | that takes a boolean argument, used to enable or disable most of the > | complexity in the function. If the caller passes a false boolean > | argument, the function would simplify to pretty much nothing. On Wed, Jul 30, 2003 at 06:58:24AM +0200, Gabriel Dos Reis wrote: > This is not a convincing example. Ouch. It is convincing to me! > | Therefore claiming that the context of use shouldn't play any role in > | deciding whether a function should be inlined is absurd. > > No, what is absurb is the imaginary scenario you describ above. Gaby, the scenario Alex describes is COMMON. Constant propagation frequently causes lots of code to be thrown away, and any automatic inlining decision that doesn't take this effect into account is broken.