This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFD: language hooks in GIMPLE / lang_flag?
> FWIW, I agree. However, I do not agree that two types are compatible
> iff they would produce identical RTL. GIMPLE should still know that
> "int" and "long" are distinct types (even if both 32 bits) since that
> permits alias analysis to do a better job.
Sure, but that's not what we currently use the compatible types hook for.
What you're essentially saying is that (int *) and (long *) are different
types, and that's correct. But if we have a cast from "int" to "long"
or vice versa, that cast is not accomplishing anything and *could* be
deleted.
> Similarly, "struct S { int
> i; }" and "struct T {int j; }" are not the same type.
Likewise. (struct T *) and (struct S *) aren't the same, but a
VIEW_CONVERT_EXPR from struct T to struct S isn't accomplishing anything
and can also be deleted.