This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __builtin_expect for indirect function calls
- From: Jonathan Adamczewski <jadamcze at utas dot edu dot au>
- To: trevor_smigiel at playstation dot sony dot com
- Cc: gcc <gcc at gcc dot gnu dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>, Russell_Olsen at playstation dot sony dot com
- Date: Tue, 18 Dec 2007 13:02:45 +1100
- Subject: Re: __builtin_expect for indirect function calls
- References: <20071218000552.GV3656@playstation.sony.com>
- Reply-to: jadamcze at utas dot edu dot au
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.