From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9423 invoked by alias); 26 Dec 2007 18:54:20 -0000 Received: (qmail 9404 invoked by uid 22791); 26 Dec 2007 18:54:19 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Dec 2007 18:54:15 +0000 Received: (qmail 28135 invoked from network); 26 Dec 2007 18:54:13 -0000 Received: from unknown (HELO ?192.168.0.2?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Dec 2007 18:54:13 -0000 Message-ID: <4772A350.6030907@codesourcery.com> Date: Wed, 26 Dec 2007 19:10:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Hans-Peter Nilsson CC: trevor_smigiel@playstation.sony.com, gcc , Russell_Olsen@playstation.sony.com Subject: Re: __builtin_expect for indirect function calls References: <20071218000552.GV3656@playstation.sony.com> <20071221220630.Y67443@dair.pair.com> In-Reply-To: <20071221220630.Y67443@dair.pair.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00690.txt.bz2 Hans-Peter Nilsson wrote: > On Mon, 17 Dec 2007, trevor_smigiel@playstation.sony.com wrote: >> When we can't hint the real target, we want to hint the most common >> target. There are potentially clever ways for the compiler to do this >> automatically, but I'm most interested in giving the user some way to do >> it explicitly. One possiblity is to have something similar to >> __builtin_expect, but for functions. For example, I propose: >> >> __builtin_expect_call (FP, PFP) > > Is there a hidden benefit? I mean, isn't this really > expressable using builtin_expect as-is, at least when it comes > to the syntax? That was my first thought as well. Before we add __builtin_expect_call, I think there needs to be a justification of why this can't be done with __builtin_expect as-is. -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713