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

Stefanos Baziotis via llvm-dev
Tue, 07 Jul 2020 17:37:39 -0000

>  Ah, that's important information I didn't have.  Thank you!

No problem, glad to help!

To the rest of your thoughts, I certainly agree. One interesting question
is why LAA
didn't use DA at all. Other than that, note that LAA is quite specialized,
namely for
loop vectorization. Actually, it's even more specific. For innermost loop
vectorization.
That affects the design. It might had been easier to create this
specialized tool than
extending a general one (if that was a good path to follow is another
topic).

> But yet they are intimately related in that the kind of information you
> want to know statically and dynamically is the same.  I wonder what it
> would take to extend DA to generate runtime checks if it can't prove
> independence.

Indeed, but again, IMHO unifying them is neither easy nor does it make
sense.
They do fundamentally the same thing but their directions are very
different.

So, I see two options:

a) As you said

>  I wonder what it would take to extend DA to generate runtime checks if
it can't prove independence.

Personally, I see potential but neither do I know what it would take. Since
this is something that I'm
currently thinking of, I would be more than interested to discuss it
extensively.

In any case, I would strongly prefer that we don't follow the LAA path,
since I don't think it has potential
anyway. I think that we should try to find a way to extend it that is also
based on strong theoretical foundation
and maintains the high quality of code.

b) Extend LAA to do static checks

The question here is though: Why do that? As I said, it doesn't seem to
have potential and I believe that people
working on vectorizers (either LLVM's current one or external like e.g. RV
and VPlan) don't do either.

Tell me what you think and I'm looking forward to more people jumping in.

- Stefanos

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

> Stefanos Baziotis via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
> > Their most important difference is that DA is used for compile-time /
> > static checks while LAA is mainly used for generating run-time checks.
>
> Ah, that's important information I didn't have.  Thank you!
>
> > Now, as for unifying them, if we mean something other than just
putting
> > them in the same file, I don't think it can happen.
> > IMHO they're way more apart than it initially seems.
>
> But yet they are intimately related in that the kind of information you
> want to know statically and dynamically is the same.  I wonder what it
> would take to extend DA to generate runtime checks if it can't prove
> independence.
>
> The thing I fear is one or the other being enhanced to resolve more
> things statically without the other getting the same improvements.  Then
> some passes benefit and others don't and it won't be clear why.
The
> same could happen with enhancement to dynamic checking (if it were added
> to DA).
>
>                        -David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20200707/4b31c73b/attachment.html>