This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do not use TYPE_CANONICAL in useless_type_conversion


> 
> && 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.

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;
> >  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]