This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery
First of all, thanks for reviewing.
> Looks like a massive hack, for a number of reasons.
> 1. If it really can alias all variables, why are you only adding the
> call clobbered ones, and not the addressable ones?
Because I think we can take advantage of the sophisticated aliasing machinery
you (and others) have devised to do better at the Tree level than what we do
at the RTL level, even for TYPE_REF_CAN_ALIAS_ALL.
> 2. We already have machinery to deal with this for things like char,
> without hacks like the above.
> I suggest you find where we deal with that, and do the same.
My understanding is that the situation is not the same though, we're talking
exclusively about pointer types here, the pointed-to types are irrelevant.
> As a general statement, we shouldn't need TYPE_REF_CAN_ALIAS_ALL, we
> handle the same thing in other languages without it.
No, I don't think we do, see the C testcase I posted.
--
Eric Botcazou