__builtin_expect for indirect function calls
Mark Mitchell
mark@codesourcery.com
Wed Dec 26 19:10:00 GMT 2007
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
More information about the Gcc
mailing list