[llvm-dev] On Loop Distribution pass
Gerolf Hoflehner via llvm-dev
llvm-dev at lists.llvm.org
Mon Oct 17 00:28:00 PDT 2016
Hi,
This is interesting data. I’m wondering if you could figure out (in at least some of the instances) when and why loop distribution would speed-up a benchmark by how much? Apart from some technicalities the major difficulty why LD is off by default is the cost model. Your analysis could shed more light on what it should be.
Thanks,
Gerolf
> On Oct 9, 2016, at 10:09 AM, Dangeti Tharun kumar via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Dear community,
>
> Our team at IITH have been experimenting with loop-distribution pass in LLVM. We see the following results on few benchmarks.
>
> clang -O3 -mllvm -enable-loop-distribute -Rpass=loop-distribute file.c
> clang -O3 -mllvm -enable-loop-distribute -Rpass-analysis=loop-distribute file.c
>
>
> TORCH <http://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/torch-testbed/>:
> There are nearly 488 loops in this benchmark. LLVM was not able to distribute any loop.
>
> TSVC <https://github.com/shantanuatiith/TSVC_>:
> There are 151 loops coded in plain ‘C’, none of them got distributed. TSVC has particularly candidates valid for distribution like the one below. The inner loop in this example can be distributed.
>
> for (int nl = 0; nl < ntimes/2; nl++) {
> for (int i = 1; i < LEN; i++) {
> a[i] += c[i] * d[i];
> b[i] = b[i - 1] + a[i] + d[i];
> }
> dummy(a, b, c, d, e, aa, bb, cc, 0.);
> }
>
> MiBench <http://vhosts.eecs.umich.edu/mibench//>:
> There are 6539 loops in MiBench. None of the loops were distributed by the loop-distribution pass of LLVM.
>
> CoMD <https://github.com/exmatex/CoMD>:
> CoMD is a reference implementation of typical classical molecular dynamics algorithms and workloads.
> Out of 112 loops none of them are distributed.
>
>
> For the specific loop I have shown above which is straight forward a good distribution candidate, the remark is "loop not distributed: memory operations are safe for vectorization [-Rpass-analysis=loop-distribute]".
>
> Can someone reason these results and this remark?
>
>
> I humbly request the community to correct me, if am missing something in my analysis.
>
> --
> Thank you
> D Tharun kumar
> CS15MTECH11002
> 9948373970
> CSE-IITH
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161017/6cde1e7a/attachment.html>
More information about the llvm-dev
mailing list