On Fri, Jun 21, 2019 at 12:24 AM Jeff Law <l...@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. I'd probably avoid the new clear_ptr_nonnull function since it might make people miss the other half (alignment). Otherwise looks OK. Richard. > Jeff