[patch] (4.1 project list) vectorizer alignment improvements

Dorit Naishlos DORIT@il.ibm.com
Fri Jun 10 14:57:00 GMT 2005





Richard Henderson <rth@redhat.com> wrote on 09/06/2005 01:16:46:
> On Wed, Jun 01, 2005 at 11:46:50PM +0300, Dorit Naishlos wrote:
> > > I'm thinking of something like
> > >
> > >    for (i = 0; i < N; ++i) {
> > >      a[i] += a[i+4];
> > >      b[i+1] += b[i+5];
> > >    }
> > >
> > > or something like that.  The point being that a[i] and a[i+4] are 4
> > > units apart, as are b[i+1] and b[i+5].  But a[i] and b[i+1] are not
> > > co-aligned, which would seem to break the bulk processing that you're
> > > doing here.
> > >
> >
> > no, cause none of the accesses to array 'b' will be recorded as having
the
> > same alignment as any of the accesses to array 'a'.
>
> Ok, bad example.  I wanted something where we *do* have a
> dependence-distance, and some of the references are co-aligned
> and some aren't.  Perhaps
>
>    a[i] += a[i+4];
>    a[i+N+1] += a[i+N+5];
>
> But I guess the vector being per-statement means that's ok.  We'll
> have [i] and [i+4] on one list and [i+N+1] and [i+N+5] on another,
> but ne'er the twain shall meet.  Correct?
>

yes.

committed to mainline,

thanks,
dorit

> In which case this is all ok.  Sorry for the delay.
>
>
>
> r~



More information about the Gcc-patches mailing list