[PATCH][RFC] Re-structure tree_ssa_useless_type_conversion_1 to work towards a middle-end type system
Michael Matz
matz@suse.de
Wed Jun 20 14:36:00 GMT 2007
Hi,
On Wed, 20 Jun 2007, Andrew Pinski wrote:
> On 6/20/07, Michael Matz <matz@suse.de> wrote:
> > Hi,
> >
> > On Wed, 20 Jun 2007, Richard Guenther wrote:
> >
> > > /* If the outer type is (void *), then the conversion is not
> > > necessary.
> > > ??? This makes tree_ssa_useless_type_conversion_1 not
> > > transitive. */
> >
> > Not this line itself makes it not transitive, but the fact that it still
> > relies on the frontends langhooks makes it so. Document that fact so it's
> > clear that when the final goal is implemented (langhook removed) this
> > doesn't violate transitivity.
>
> Huh? Yes it does violate transivity. int *a; void *b;
> "b = a;" vs "a = (int*)b;" (this is IR form I am talking about).
That example shows that uselessness is not symmetric, it doesn't seem to
talk about transitivity, but we already knew that this relation isn't
symmetric. And no, regarding conversions _to_ void* as useless in itself
doesn't destroy transitivity anywhere. Except that currently the whole
thing still uses the langhook, which sometimes regards conversion _from_
void* as useless, which obviously is broken.
Ciao,
Michael.
More information about the Gcc
mailing list