From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26281 invoked by alias); 14 Dec 2006 23:53:30 -0000 Received: (qmail 26272 invoked by uid 22791); 14 Dec 2006 23:53:30 -0000 X-Spam-Check-By: sourceware.org Received: from atrey.karlin.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.31.123) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Dec 2006 23:53:22 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 29025) id B9133C7C68; Fri, 15 Dec 2006 00:53:19 +0100 (CET) Date: Thu, 14 Dec 2006 23:53:00 -0000 From: Zdenek Dvorak To: gcc-patches@gcc.gnu.org Subject: Patch ping Message-ID: <20061214235319.GA15142@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i 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: 2006-12/txt/msg01082.txt.bz2 Hello, http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01495.html > estimate_num_insns is currently used for several things: > > -- on several places (loop unrolling, unswitching, exception > handling expansion), to estimate the size of the code > -- in prefetching, to estimate time necessary to execute the > code > -- in inlining for magic heuristic (that pretends to do the > former, but in fact turns out to be closer to the latter) > > Not surprisingly, it cannot work well enough for all these usages > (in particular, the optimizations that rely on it being the size of > the code suffer by the unrealistical values returned for calls and > divisions). This patch makes it possible to select which of these > three estimates should be returned (by passing the structure containing > costs of various constructs to it). Zdenek