[PATCH] D38691: Add anti- and output loop carried dependences in SwingScheduler

Ning Xie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 14 08:30:13 PDT 2017


ning4827 added a comment.

Thanks Brendon for the comments. I have updated the diff. Let me know if it's okay.

Best,
Ning

In https://reviews.llvm.org/D38691#896376, @bcahoon wrote:

> Hi Ning,
>
> Just a couple of minor comments, but I think the change looks good. I tried your example, provided in an earlier version, but it doesn't have any output or anti dependences by the time it gets to the pipeliner.  The load of a[i-1] gets optimized away.  I used the following to compile it, so perhaps some other command-line options are needed?


I worked on another platform and didn't realize that a[i-1] will be optimized away on Hexagon..

> 
> 
>   clang -fno-unroll-loops -target hexagon -O2 example.c -o example.s -S
>    
> 
> But, I did noticee that a lit test, test/CodeGen/Hexagon/vect/vect-v4i16.ll, fails with the patch due to extra output dependence edges.  It contains a loop that is no longer pipelined. The code generation is different, so the checks in the test fail.  I think it's fine, for this lit test to remove the checks:
>  ; CHECK: memuh(r{{[0-9]+}}+#6)
>  ; CHECK: combine(r{{[0-9]+}},r{{[0-9]+}})
> 
> and leave the check for the vaddh, which shows that the test is vectorized.
> 
> Thanks,
> Brendon




https://reviews.llvm.org/D38691





More information about the llvm-commits mailing list