[PATCH] check alias sets in add_inter_loop_mem_dep (ddg.c)

Ayal Zaks ZAKS@il.ibm.com
Tue Jan 20 20:24:00 GMT 2009


Daniel Berlin <dberlin@dberlin.org> wrote:

> I can't approve your patch, I don't maintain that area of the
> compiler. I can only say that from an aliasing perspective, it is
> correct :)
>
> Normally, the procedure is that you can either ask for
> write-after-approval access, and once getting it, commit it yourself,
> or ask someone with commit access to commit it for you.

I approve the modulo-scheduler part (i.e. ddg.c). A main advantage of this
patch is the ability to check the potential of modulo-scheduling loops by
using __restrict'ed testcases.


> > > > Should I also include this test in the patch?

Yes, certainly. Another test using different types is also appropriate.


Please add to the comment:
> > > > +  if (!insn_alias_sets_conflict_p (from->insn, to->insn))
> > > > +    /* Do not create edge if memory references have
> > > disjoint alias sets.

  Because this implies that the two memory reference will not alias even
across iterations.

> > > */
> > > > +    return;


> or ask someone with commit access to commit it for you.

Revital, could you please commit this for Bingfeng, once the alias.{h,c}
part is approved?.


Thanks,,
Ayal.


> On Mon, Jan 19, 2009 at 4:59 AM, Revital1 Eres <ERES@il.ibm.com> wrote:
> > Hello,
> >
> >> I asked on the GCC mailing list about the DDG export patch a few
months
> > ago. I
> >> tried to merged it recently into the mainline, without much success. A
> >> immediate issue I have with modulo scheduling is that it doesn't
handle
> >> restrict keyword. I just adapt these the walker functions in the above
> > patch,
> >> which I think is generic and simple.
> >
> > OK, thanks.
> > I am a little confused regarding how alias_sets_conflict_p will handle
> > cross-iteration dependencies when constructing DDG for SMS.
> >
> > From previous talks with Andrey I understood that data dependency
> > graph construction for SMS can not use rtl alias analysis because of
the
> > following explanation:
> > When adding cross-iteration dependencies, because rtl AA includes
> > base+offset disambiguation, which allows to disambiguate a[i] and a[i
+1]
> > on targets with base+offset memory addressing; while a[i] and a[i+1]
> > are independent within one iteration, cross-iteration dependency still
> > must be added; thus, DDG construction adds dependency edges for all
> > pairs of memory references.
>
> You can check the alias sets without having to check the base+offset,
> which is what Bingfeng's patch does.
> If the alias sets do not conflict, they will *never* be aliased,
> cross-iteration or otherwise.
>
> --Dan



More information about the Gcc-patches mailing list