This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR32921, prune virtual operands of memory accesses based on TBAA
On 10/19/07, Richard Guenther <rguenther@suse.de> wrote:
> On Thu, 18 Oct 2007, Daniel Berlin wrote:
>
> > On 10/18/07, Richard Guenther <rguenther@suse.de> wrote:
> > > On Thu, 18 Oct 2007, Richard Guenther wrote:
>
> But then the killer issue comes along. The way we designed
> CHANGE_DYNAMIC_TYPE_EXPR makes it impossible to do TBAA pruning on
> memory accesses. For g++.dg/init/new16.C we have
>
> int *l = (int *)p;
> *l = 0;
> f = new (p) long;
> *f = -1;
>
> l_7 = (int *) p_6(D);
> *l_7 ={v} 0;
> <<<change_dynamic_type (long int *) p_6(D))>>>
> D.2035_15 = p_6(D);
> f_10 = (long int *) D.2035_15;
> *f_10 ={v} -1;
>
> but we do not have a connection of the CHANGE_DYNAMIC_TYPE_EXPR to
> the memory reference site. So we happily prune SMT.17 from f_10s
> alias set.
Yes we do.
It gets marked with a no tbaa pruning flag.
i forget which annotation this is stored in, but they are propagated
around pointers the same way that everything else is ;)