[PATCH] D24593: Standford/Bubble sort code restructure

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 17:34:36 PDT 2016


MatzeB added inline comments.

================
Comment at: SingleSource/Benchmarks/Stanford/Bubblesort.c:159
@@ -156,1 +158,3 @@
+			sortlist[i] = sli;
+			sortlist[i + 1] = sli1;
 			i=i+1;
----------------
evstupac wrote:
> The flakiness caused by unpredictable memory accesses to array and code on short distance:
> 
> Loop:
> 
> ```
> if (a[i] > a[i + 1) {// load a[i], a[i+1];
> //store to a[i], a[i+1];
> }
> ```
> 
> Making stores unconditional will simplify memory accesses and potentially CFG.
> This will open the test for compiler optimizations (like unroll, scalar replacement, if conversion...).
> Generally the idea to convert the test from memory test to compiler test.
> This will open the test for compiler optimizations (like unroll, scalar replacement, if conversion...).
Generally the idea to convert the test from memory test to compiler test.

We should not change any of the existing benchmarks. It is the Stanford benchmark as is, if you change it we will have a sudden change change in performance in the LNT database, and we can no longer claim to be compiling the "Stanford" benchmark (it's the same reason that we cannot modify SPEC to be better suited for the compiler).

If anything you should add a new benchmark with the structure you desire.



https://reviews.llvm.org/D24593





More information about the llvm-commits mailing list