[RFA] [PR tree-optimization/90949] Don't propagate context sensitive non-nullness when copy-propagating pointers

Jeff Law law@redhat.com
Fri Jun 21 14:43:00 GMT 2019


On 6/21/19 6:28 AM, Richard Biener wrote:
> On Fri, Jun 21, 2019 at 12:24 AM Jeff Law <law@redhat.com> wrote:
>>
>> As outlined in the BZ, our alias analysis code is context insensitive.
>> So when we copy-propagate pointers, we can can and do copy PTA
>> information from members to the representative pointer in the copy-of
>> chain (we do this when the representative pointer has no associated PTA
>> information).
>>
>> However, [E]VRP can set the non-nullness of a pointer using context
>> sensitive information.  So we have to be more careful when copying PTA
>> information.
>>
>> We already have similar issues with alignment information as well.  This
>> patch just extends the hack to avoid copying alignment information in
>> some circumstances to also avoid copying the non-nullness property.
>>
>> Bootstrapped and regression tested on x86_64-linux-gnu.  OK for the trunk?
> 
> I think this should be done in reset_flow_sensitive_info () as well
> and tree-ssa-copy.c should use that function instead of calling
> mark_ptr_info_alignment_unknown.
OK.  Agreed that's better -- one centralized routine to reset this stuff
if we find more over time.

> 
> I'd probably avoid the new clear_ptr_nonnull function since it might make
> people miss the other half (alignment).
OK.  Presumably you just want to twiddle the field directly?   THat's
easy 'nuff.

Jeff



More information about the Gcc-patches mailing list