This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Re-structure tree_ssa_useless_type_conversion_1 to work towards a middle-end type system
- From: Michael Matz <matz at suse dot de>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Wed, 20 Jun 2007 17:06:45 +0200 (CEST)
- Subject: Re: [PATCH][RFC] Re-structure tree_ssa_useless_type_conversion_1 to work towards a middle-end type system
- References: <Pine.LNX.4.64.0706201354510.24708@zhemvz.fhfr.qr> <200706201704.34972.ebotcazou@libertysurf.fr>
Hi,
On Wed, 20 Jun 2007, Eric Botcazou wrote:
> > ! 2) tree_ssa_useless_type_conversion_1 is not communtative.
> > ! From a < b does not follow a > b.
> > !
> > ! 3) Conversions are useless only if with the resulting type
> > ! can be used in a subset of the operations the original type
> > ! can be applied to. For example casts to void* are useless,
> > ! casts from void* not. Casts to const T* are useless, casts
> > ! from const T* to T* not.
>
> My understanding is that it's a relation, not an operation, so the
> proper term for 2 would be "symmetric".
Correct.
> For the sake of completeness,
> you could also add that it's reflexive: a < a holds.
>
> Which would suggest to find a better symbol than '<' for it. :-)
a <# p ? ;-)
Ciao,
Michael.