This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [autovect] [patch] Dependence tests and dimensions
- From: Ira Rosen <IRAR at il dot ibm dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>
- Date: Mon, 20 Jun 2005 15:17:47 +0300
- Subject: Re: [autovect] [patch] Dependence tests and dimensions
Daniel Berlin <dberlin@dberlin.org> wrote on 19/06/2005 15:40:24:
> On Sun, 2005-06-19 at 12:21 +0300, Ira Rosen wrote:
> >
> >
> >
> > This patch removes a dependence test based on DRs dimensions: while
being
> > correct for ARRAY_REFs, it is incorrect to decide that two data-refs
are
> > independent if their dimensions numbers differ for the case when both
> > ARRAY_REFs and INDIRECT_REFs are tested.
> > E.g.,
> > for i
> > for j
> > *((int *)p + i + j) = a[i][j];
> >
> > The access function of the pointer access is {j_init, + 4B}_2 relative
to
> > 'p + i', and the access functions of the array are '{i_init, +
i_step}_1
> > and {j_init, +, j_step}_2'. Therefore, 'a[i][j] is two-dimensional and
'p'
> > is one-dimensional. But, of course, 'p' can point to 'a', and we need
to
> > apply alias analysis to check this.
>
>
> Here, p can't point to a, unless you've written the example wrong.
Yes, but p can point to a[0], i.e., two data-refs can access the same
memory even though their dimensions differ. Do you agree?
Thanks,
Ira