This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery


Eric Botcazou wrote:
> 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.

This is still the wrong place to do it anyway.  By the time we get to
operand scanning, we already should know everything we need to know, and
not be special casing some pointers (In reality, even the pruning code
doesn't belong there, it's just not really possible to do it anywhere
else right now).

At worst, you could simply create NMT's that point to all the call
clobbered variables, and set the pointers with TYPE_REF_CAN_ALIAS_ALL to
have that NMT in SSA_NAME_PTR_INFO.


> 
>> 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.

This isn't the reason it's different, the reason it's different is
because apparently this only happens on some pointers.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]