This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __builtin_expect for indirect function calls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]