[PATCH] Make devirtualization use BINFO_VTABLE instead of BINFO_VIRTUALS
Jan Hubicka
hubicka@ucw.cz
Fri Sep 2 13:43:00 GMT 2011
> Hi,
>
> On Thu, Sep 01, 2011 at 08:52:30PM +0200, Jan Hubicka wrote:
> > > - Nevertheless, this method of devirtualization cannot automatically
> > > de-thunkize this-adjusting thunks and newly direct calls to them
> > > cannot be inlined because the inliner does not have this capability
> > > now. This is in fact a regression from 4.6, and testcases
> > > ivinline-7.C and ivinline-9.C had to be XFAILed exactly for this
> > > reason. The size of the memory savings and the fact that we do not
> > > devirtualize that much now make this an acceptable tradeoff, though.
> >
> > OK, the "dethunkization" was ugly anyway. I guess we will need to add support
> > for handling thunks in inliner but that can go incrementally.
>
> Do we actually have the offsets and indices necessary for
> de-thunkization available somewhere in the middle end structures (with
> BINFO_VIRTUALs being freed in free_lang_data now)?
They live in cgraph, at least for thunks that has been finalized in current compilation
unit. I wonder how much we care about de-thunkizing calls into other compilation unit,
but then C++ FE can just add the thunks into callgraph, too.
Honza
More information about the Gcc-patches
mailing list