[PATCH] D24593: Standford/Bubble sort code restructure

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 17:36:27 PDT 2016


mehdi_amini 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;
----------------
MatzeB wrote:
> 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.
> 
It seems to me that you're creating a "new" benchmark by doing that.
It does not seem legit to change a benchmark because you find it hard to analyze from within the compiler.

(That does not fit my definition of flaky either)



https://reviews.llvm.org/D24593





More information about the llvm-commits mailing list