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?
Richard Kenner wrote:
>> 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.
In RTL, sure. In GIMPLE, I don't think so, as if you do that you lose
the type information about the result. But, I'm not a GIMPLE expert;
maybe there's some magic way of handling this.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713