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 Thu, 2005-10-27 at 15:33 +0200, Tomas Bily wrote:
> Hi, 
> 
>  i am sendig patch for devirtualization virtual calls using profile feedback. 
..
>   if (actual_callee_addres == addres_of_most_common_function/method)
>     do direct call
>   else
>     old call


This isn't really devirtualization, though i've seen it lumped in there
before.

De-virtualization is making virtual function calls completely direct
(even when expanding to an if form).  In your optimization, the virtual
call is still there, because you haven't actually done any analysis as
`to what calls could possibly be made and used that information, you are
just seeing what calls *were made in the past*, and trying to specialize
for that case.

It's useful, but it's not devirtualization, and calling it such would
just confuse people :)

--Dan


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