From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31481 invoked by alias); 6 Jan 2008 19:44:17 -0000 Received: (qmail 31472 invoked by uid 22791); 6 Jan 2008 19:44:16 -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; Sun, 06 Jan 2008 19:43:59 +0000 Received: (qmail 22141 invoked from network); 6 Jan 2008 19:43:57 -0000 Received: from unknown (HELO ?192.168.0.2?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Jan 2008 19:43:57 -0000 Message-ID: <47812F74.3020905@codesourcery.com> Date: Sun, 06 Jan 2008 19:44:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Richard Guenther CC: trevor_smigiel@playstation.sony.com, Hans-Peter Nilsson , gcc , Russell_Olsen@playstation.sony.com, Andrew_Pinski@playstation.sony.com, Mark Mendell Subject: Re: __builtin_expect for indirect function calls References: <20071218000552.GV3656@playstation.sony.com> <20071221220630.Y67443@dair.pair.com> <4772A350.6030907@codesourcery.com> <20080103233308.GD5853@playstation.sony.com> <477F190B.2000807@codesourcery.com> <84fc9c000801050240l6918b59dpd519dea81ddd3ad@mail.gmail.com> In-Reply-To: <84fc9c000801050240l6918b59dpd519dea81ddd3ad@mail.gmail.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: 2008-01/txt/msg00049.txt.bz2 Richard Guenther wrote: >> What do people think? Do we have the leeway to change this? Or should >> we add __builtin_expect2? Or add an -fno-polymorphic-builtin-expect? >> Or...? > > I think we should simply make __builtin_expect polymorphic, but make sure > to promote integral arguments with rank less than long to long. I thought of that, but I hadn't suggested this idea because it seemed so weird. Promoting to int would not be odd, but promoting to long is weird. Anyhow, you're right; that's another option, and, despite weirdness, plausible. I can't think of a way in which it changes current behavior, unless you call __builtin_expect with a long long, and that's probably not going to do what you expect right now anyhow. -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713