This is the mail archive of the gcc-patches@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: PATCH: Devirtualization using profiling feedback


On Oct 27, 2005, at 6:33 AM, Tomas Bily wrote:
  if (actual_callee_addres == addres_of_most_common_function/method)
    do direct call
  else
    old call

Hum.... It would be nice to issue a conditional that is type based, then, you can hoist like conditionals out, say, of loops and combine them. Say, something like:


if (vtable_pointer == B_vtable)
    do direct call to B_vtable[idx]
else
    old call

d.fun1();
d.fun2();
d.fun3();

then becomes:

    if (d.vtblp == D)
        D::foo1();
        D::foo2();
        D::foo3();
    else
        ...


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