This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Remove vtable_method field in cgraph_node
On Mon, 18 Apr 2011, Jan Hubicka wrote:
> > Ah, no. We _did_ that in CCP but now we only adjust the OBJ_TYPE_REF
> > expr in CCP and defer to fold_stmt to eventually "devirtualize" it.
> > See PR45878. Then rev.165435 was necessary, as we dropped OBJ_TYPE_REF
> > for the non-devirtualized call as well. As both cases were because
>
> Hmm, sounds slipperly.
> In any case OBJ_TYPE_REF of constant argument should be banned, or
> we would need to extend gimple_call_fndecl to return contained fndecl.
Yeah, I thought about this as well ...
> Devirtualization without enabling an inlining is essentially useless transform
> and it is precisely what we do now on this testcase...
Well, it transforms an indirect into a direct call (unless we handle
direct OBJ_TYPE_REF calls in gimple_call_fndecl of course).
> > of type conversion issues this should be fixed with separating the
> > call function type as we do now.
> >
> > I'll look into handling copyprop and FRE similarly.
>
> Thanks, I would not even mind having some automatic check that the constant
> OBJ_TYPE_REFs don't leak at cgraph edge construction time...
> Honza
I still have no idea what this OBJ_TYPE_REF is for and why we need to
preserve it ... (apart from for the weirt type-based devirtualization).
Richard.