<div dir="ltr">Hi,<br><br>It happens that I'm working on dependence analysis this summer for outer loop vectorization. I have studied a bit both LAA and DA.<br><br>Their most important difference is that DA is used for compile-time / static checks while LAA is mainly used for generating run-time checks.<br><br>Now, more to their core, DA is based on strong theoretical background and has a phenomenally clean implementation<br>(basically, if you have understood the paper, which itself is written as a textbook chapter, since it kind of is, you have understood<br>almost all DA).<br>LAA on the other hand is a very hacky implementation and takes quite some time just to understand what it tries to do.<br>It's hard to read. Note though that I know too little to criticize. This is just how it seems to me.<br><br>It doesn't seem that strange to me that LAA had to be developed since if you see its test-suite, i.e. the problems it had to solve,<br>for a lot of them, DA just gives up while LAA generates run-time checks. Now, as to why it had to be implemented<div>in the way it was done, I would very much like to learn.<br><br>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.<br>IMHO they're way more apart than it initially seems.<br><br>Kind regards,<br>Stefanos</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τρί, 7 Ιουλ 2020 στις 6:16 μ.μ., ο/η David Greene via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Michael Kruse via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> AFAIK they are independent developments. LoopAccessAnalysis was<br>
> extracted out of the LoopVectorizer in 2015, and first developed in<br>
> 2013 (<a href="https://github.com/llvm/llvm-project/commit/d517976758c8674bdcd4c74457f7a83f20e432c5" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/d517976758c8674bdcd4c74457f7a83f20e432c5</a>)<br>
><br>
> DependenceAnalysis was a from-scratch implementation from 2012<br>
> (<a href="https://github.com/llvm/llvm-project/commit/59b61b9e2c549956b1094417a72c3943c20c9234" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/59b61b9e2c549956b1094417a72c3943c20c9234</a>)<br>
><br>
> I do not know why LoopVectorize would not make use of<br>
> DependenceAnalysis in 2013.<br>
<br>
Is anyone looking at unifying these? It's super confusing as things<br>
stand.<br>
<br>
-David<br>
<br>
> Am Mo., 6. Juli 2020 um 09:51 Uhr schrieb David Greene <<a href="mailto:david.greene@hpe.com" target="_blank">david.greene@hpe.com</a>>:<br>
>><br>
>> Michael Kruse via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
>><br>
>> > LLVM has multiple dependence analyses, each with its up- and downsides:<br>
>> ><br>
>> > * llvm::DependenceAnalysis<br>
>> > * llvm::LoopAccessAnalysis<br>
>><br>
>> Can someone explain the differences between these? As far as I can tell<br>
>> they essentially do the same thing (though perhaps one is more<br>
>> precise?). LAA seems to be used by vectorization (what else?) while DA<br>
>> seems to be used by loop transformations (what else?).<br>
>><br>
>> I am not a loop opt guy so while I'm familiar with the basic ideas, the<br>
>> details are somewhat lost on me. Is there a reason to have two passes<br>
>> or should they be combined and maintained as one pass? If I have need<br>
>> of dependence analysis it's not clear which I should use and the<br>
>> comments are not much help.<br>
>><br>
>> -David<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>