https://llvm.org/bugs/show_bug.cgi?id=28658
Bug ID: 28658 Summary: MemorySSA non linearity Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: seb...@gmail.com CC: david.majne...@gmail.com, dber...@dberlin.org, george.burgess...@gmail.com, llvm-bugs@lists.llvm.org Classification: Unclassified While investigating the cause of a huge number of queries to the MemSSA in the test-suite, I found that the compilation of MultiSource/Applications/JM/ldecod/macroblock.c has an unusually high number of lookups: 436 memoryssa - Number of Memory SSA version cache hits 30401 memoryssa - Number of MemorySSA version cache inserts 128166 memoryssa - Number of Memory SSA version cache lookups >From that file I extracted something that exposes the non linearity in the number of lookups. $ cat fun.c #define loop do { \ for (j=0;j<m;j++) \ A[i+j] += B[i+j] * C[i][H[i+j]]; \ } while (0) void fun(int *A, int **C, int *H, int n, int m) { int i, j; for (i=0;i<n;i++) { int *B = A[i] ? C[i] : C[i+1]; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; loop; } } $ clang -O3 -mllvm -stats fun.c 10284 memoryssa - Number of MemorySSA version cache inserts 20569 memoryssa - Number of Memory SSA version cache lookups Number of Memory SSA version cache lookups: 80 loops - 20569 40 loops - 5489 20 loops - 1549 10 loops - 479 1 loop - 29 Adding another statement in the loop: #define loop do { \ for (j=0;j<m;j++) \ A[i+j] += B[i+j] * C[i][H[i+j]]; \ A[i-j] += B[i-j] * C[i+j][H[i-j]]; \ } while (0) Number of Memory SSA version cache lookups: 80 loops - 160824 40 loops - 42024 20 loops - 11424 10 loops - 3324 1 loop - 138 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs