[PATCH 5/6] Indirect inlining of virtual calls

Jan Hubicka hubicka@ucw.cz
Wed Mar 10 15:24:00 GMT 2010


> Hi,
> 
> > > +   <bb 3>:
> > > +     iftmp.1_3 = &obj_2(D)->D.1762;
> > > +
> > > +   <bb 4>:
> > > +     # iftmp.1_1 = PHI <iftmp.1_3(3), 0B(2)>
> > > +     D.1879_6 = middleman_1 (iftmp.1_1, i_5(D));
> > > +     return D.1879_6;  */
> > 
> > Hmm, fragile, but this is old code, right?
> 
> I don't understand.  This is what typecasting to a second-or-later
> ancestor looks like (NULL for NULL, add offset otherwise).  The
> function that builds ANCESTOR jump functions needs to match it.

Yep, I guess for sake of those optimizations we might think of inventing GIMPLE codes
for these operations and lowering later.  But if we can limit this matching to few
places and get it robust enough I uess it is fine.

Honza



More information about the Gcc-patches mailing list