<div dir="ltr">Hi Stan,<div><br></div><div>can you share your example.bc? Can you reproduce your issue with llvm 4.0 or, better even, trunk?</div><div><br></div><div>Cheers,</div><div>Philip</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-21 18:58 GMT+02:00 Stanislav Manilov <span dir="ltr"><<a href="mailto:stanislav.manilov@gmail.com" target="_blank">stanislav.manilov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Philip,<div><br></div><div>Thanks for checking!</div><div><br></div><div>I'm running my own Foo pass that registers DependenceAnalysisWrapperPass as a prerequisite and then I run it like so:<br><br></div><div>opt -load libfoo.so -foo example.bc</div><div><br></div><div>This is LLVM 3.9.</div><div><br></div><div>Cheers,</div><div> - Stan</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 21, 2017 at 5:40 PM, Philip Pfaffe <span dir="ltr"><<a href="mailto:philip.pfaffe@gmail.com" target="_blank">philip.pfaffe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Stan,<div><br></div><div>in both cases I get a consistent anti result. Can you show us the command lines you're using? Which version of llvm is this?</div><div><br></div><div>Best,</div><div>Philip</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7263651065682540101h5">2017-06-21 17:56 GMT+02:00 Stanislav Manilov via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7263651065682540101h5"><div dir="ltr">Hello llvm-dev,<div><br></div><div>I'm running a pass that uses the result of llvm::DependenceAnalysisWrappe<wbr>rPass to compute the dependencies between all instructions of a loop. I have the following two examples of code I wish to analyse:<br><br>example A:<br><br></div><div>```</div><div><div>void move_one(int *A, unsigned n) {</div><div>  for (unsigned i = 0; i < n-1; ++i) {</div><div>    A[i] = A[i + 1];</div><div>  }</div><div>}</div></div><div>```</div><div>and example B:</div><div>```</div><div><div>void move_one_alt(int *A, unsigned n) {</div><div>  int *B = A + 1;</div><div>  for (unsigned i = 0; i < n-1; ++i) {</div><div>    A[i] = B[i];</div><div>  }</div><div>}</div><div>```</div><div><br></div><div>I would expect that I get the same result for both A and B, namely a loop carried anti (WAR) dependence from the generated load instruction to the generated store instruction. This should be the case, because on iteration i+1 the loop is writing to the element that has been read in the previous iteration - iteration i.</div><div><br></div><div>However, in example A I get a loop carried flow (RAW) dependence from the store instruction to the load instruction, while in example B I don't get any dependence at all.</div><div><br></div><div>Am I missing something, or is the result wrong?</div><div><br></div><div>Thanks,</div><div> - Stan</div><div><br></div></div></div>
<br></div></div>______________________________<wbr>_________________<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>