> > 3) STAGE using profile:
> >
> > For every checked indirect/virtual call determine if most common pid of
> > function/class method has probability more than 50%. If yes modify code
> > of
> > this call to:
> >
> > if (actual_callee_addres == addres_of_most_common_function/method)
> > do direct call
> > else
> > old call
> >
> >
> >Bootstrapped and regtested on x86_64-unknown-linux-gnu, i686-linux.
> >OK?
>
> It would be nice to have some testcase for C and C++, at least for
> successful
> instrumentation. Bonus points if you can test for a successful
> transformation
> with -fprofile-use.
There are two testcases (one C and one C++) in the patch.