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


trevor_smigiel@playstation.sony.com wrote:
> Are there any comments about the name, semantics, or usefulness of this
> extension?
>   

Sounds very useful for SPU code. I look forward to trying it out.


Toying with the idea, the following seems like a potentially useful C++
form of the proposed extension :

struct A {
virtual void foo();
};

struct B : public A {
virtual void foo();
};

A* a;

...

__builtin_expect_call (a->foo, B::foo)();



jonathan.


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