This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Devirtualization using profiling feedback
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Tomas Bily <tbily at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz, hubicka at ucw dot cz
- Date: Thu, 27 Oct 2005 09:45:11 -0400
- Subject: Re: PATCH: Devirtualization using profiling feedback
- References: <20051027133259.GA25844@atrey.karlin.mff.cuni.cz>
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