From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32463 invoked by alias); 30 Jul 2003 17:35:19 -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 32442 invoked from network); 30 Jul 2003 17:35:18 -0000 Received: from unknown (HELO dberlin.org) (69.3.5.6) by sources.redhat.com with SMTP; 30 Jul 2003 17:35:18 -0000 Received: from [192.168.1.7] (account dberlin HELO dberlin.org) by dberlin.org (CommuniGate Pro SMTP 4.1) with ESMTP-TLS id 4655311; Wed, 30 Jul 2003 13:35:18 -0400 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v581) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2DA8DB06-C2B4-11D7-B239-000A95A34564@dberlin.org> Content-Transfer-Encoding: 7bit Cc: Joe Buck , Scott Robert Ladd , Gabriel Dos Reis , Alexandre Oliva , Steven Bosscher , From: Daniel Berlin Subject: Re: std::pow implementation Date: Wed, 30 Jul 2003 18:22:00 -0000 To: Richard Guenther X-SW-Source: 2003-07/txt/msg02240.txt.bz2 On Wednesday, July 30, 2003, at 1:06 PM, Richard Guenther wrote: > On Wed, 30 Jul 2003, Joe Buck wrote: > >> However, that doesn't get around the fact that we have an -O3 switch, >> enabling a mode where the compiler has to make decisions to inline >> additional functions. >> >> In such cases, the compiler cannot ignore the effect of constant >> arguments >> causing much of the code in a called function to disappear when the >> called >> function is inlined. > > We may be able to do this now with unit-at-a-time and callgraph by > duplicating the trees for function calls with constant arguments and > binding the constant arguments and doing the tree-optimizations on > these > bodies before deciding inlining (and we may even just emit this new > function out of line if not inlined). Actually, the heuristic is usually something like: If number of calls to function with constant arguments is estimated or actually high (IE function is on some critical performance path): Otherwise, you would waste so much time trying to determine what to clone, it's absurd. > > Richard. >