[llvm-dev] How to get information about data dependencies?

Stefanos Baziotis via llvm-dev
Wed, 15 Jul 2020 20:30:35 -0000

>From what I know about Fortran (which is next to nothing), it provides
aliasing guarantees, e.g. that different rows
don't alias so yes this is important there.

A note regarding C/C++ that I was assuming, but only confirmed recently.

Any serious multi-dimensional performance code (e.g. benchmarks) is not
written with indirect pointers. E.g. if you want to do operations
on a 3-D array, the function won't get a ***A. It will get *A and then
index like A[i*n + j*m + k] (this is the same if you
take a multi-dim static array, in which indexing is lowered into the same
thing - single pointer and GEPs).

Probably the reason is what we're discussing. Because you get one pointer,
that you also mark _restrict_, and you're done.

I'm (partly) in the middle of investigating DA's role in LLVM, hopefully
something good will come out.

- Stefanos

Στις Τετ, 15 Ιουλ 2020 στις 10:17 μ.μ., ο/η David Greene <
david.greene at hpe.com> έγραψε:

> Stefanos Baziotis via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
> > Well... I tried that and it doesn't seem to be very useful
> > unfortunately.  The C/C++ way that arrays are defined is probably why
> > DA is not that useful. Namely that a row can alias with another row in
> > 2D arrays. The theory behind DA is quite powerful if we knew that they
> > don't alias. Right now, it just gives up.
>
> Note that the situation is very different in flang, where good
> dependence analysis becomes much more critical.
>
>                       -David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20200715/e835e128/attachment.html>