> > - if (TREE_CODE (t) != TREE_BINFO) > > + /* Try to work out BINFO from virtual table pointer value in > > replacements. */ > > + if (!t && agg_reps && !ie->indirect_info->by_ref) > > At this point you know that !ie->indirect_info->polymorphic is set and > thus ie->indirect_info->by_ref is always false because it really has > no meaning (it is only meaningful when agg_contents is set which is > mutually exclusive with the polymorphic flag).
I was worried here about case where in future we may want to represent call of virtual methods from pointers passed by reference (i.e. in some other object). We don't do that at the moment, but for that would really need better jump functions. If you preffer, I can remove that check. Honza > > > { > > - tree binfo; > > - binfo = gimple_extract_devirt_binfo_from_cst > > - (t, ie->indirect_info->otr_type); > > - if (!binfo) > > + while (agg_reps) > > + { > > + if (agg_reps->index == param_index > > + && agg_reps->offset == ie->indirect_info->offset > > + && agg_reps->by_ref) > > + { > > + debug_tree (t); > > + t = agg_reps->value; > > + t = vtable_pointer_value_to_binfo (t); > > + break; > > + } > > + agg_reps = agg_reps->next; > > + } > > + } > > + > > + /* Try to work out BINFO from virtual table pointer value in known > > + known aggregate values. */ > > + if (!t && known_aggs.length () > (unsigned int) param_index > > + && !ie->indirect_info->by_ref) > > The same here. > > Thanks, > > Martin