On Thu, 8 Oct 2015, Jan Hubicka wrote:

> > 
> > && TREE_CODE (outer_type) == OFFSET_TYPE
> > 
> > Ok with those changes.
> 
> Thank you! I commited the patch. At a hike today it appeared to me that 
> for ipa-icf and other calling convetions checks we should not rely on 
> useless_type_conversion_p because there may be types that are compatible 
> in gimple type system but have different calling conventions.  I will 
> hack calling convention comparer tomorrow - should not be too hard, just 
> doing the cumulative walk and comparing that the RTL containers are the 
> same.

Heh, we need a calling convention checker in 
gimple_builtin_call_types_compatible_p and friends!

Btw, with the TYPE_CANONICAL changes I wonder whether we can make
gimple_get_alias_set (the LTO get_alias_set langhook) just glob
to TYPE_CANONICAL?

Richard.

> Honza
> > 
> > Thanks,
> > Richard.
> > 
> > > +    return useless_type_conversion_p (TREE_TYPE (outer_type),
> > > +                               TREE_TYPE (inner_type))
> > > +    && useless_type_conversion_p
> > > +         (TYPE_OFFSET_BASETYPE (outer_type),
> > > +          TYPE_OFFSET_BASETYPE (inner_type));
> > >  
> > >    return false;
> > >  }
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to