[test-suite] r241675 - [LNT] Reduce I/O execution time for Polybench

Renato Golin renato.golin at linaro.org
Wed Jul 8 03:21:43 PDT 2015


Author: rengolin
Date: Wed Jul  8 05:21:42 2015
New Revision: 241675

URL: http://llvm.org/viewvc/llvm-project?rev=241675&view=rev
Log:
[LNT] Reduce I/O execution time for Polybench

Polybench had large execution time due to the successive call to
fprintf as much as 4000*4000 times. For most programs, this was more
than 1/2 of its execution time.

The current solution is to transform the values into a stream of
nibbles as a char string, and print it once for every row, ie.
only as much as 4000 times, by using fputs instead of fprintf.

Overall new execution time is 47% of previous with some as low as 5%.
The reduction on x86_64 was 53%, on ARM was 51% and on AArch64 was 55%,
which means most of the time was spent on I/O, not the actual benchmark.

Test fdtd-apml was not converted because it's not bit identical across
platforms, but it should be. Adding a FIXME. Other tests were not
converted due to regressing in run time for being too simple/small even
on our slowest targets.

Modified:
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/gemver.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/fdtd-apml.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.c
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output
    test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output.small
    test-suite/trunk/SingleSource/Benchmarks/Polybench/utilities/polybench.h

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.c Wed Jul  8 05:21:42 2015
@@ -43,13 +43,14 @@ void print_array(int m,
 
 {
   int i, j;
+  char *printmat = malloc(m*8);
 
-  for (i = 0; i < m; i++)
-    for (j = 0; j < m; j++) {
-      fprintf (stderr, DATA_PRINTF_MODIFIER, symmat[i][j]);
-      if ((i * m + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < m; i++) {
+    for (j = 0; j < m; j++)
+      print_element(symmat[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-7a921eb499d9fab524cee1ae065eee8c
+ab44d09216ee09fe72e448e7c9a0a13b

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/correlation/correlation.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-dd629592033680e24cb3b818818292e8
+4dcdd4b95a19a6cfbd32f4d5f24e17be

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.c Wed Jul  8 05:21:42 2015
@@ -42,13 +42,14 @@ void print_array(int m,
 
 {
   int i, j;
+  char *printmat = malloc(m*8);
 
-  for (i = 0; i < m; i++)
-    for (j = 0; j < m; j++) {
-      fprintf (stderr, DATA_PRINTF_MODIFIER, symmat[i][j]);
-      if ((i * m + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < m; i++) {
+    for (j = 0; j < m; j++)
+      print_element(symmat[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-1af493f3c2d7d6b5acbd61a3852415c8
+7a284ecb4d8b0f9e4132181b8c8754cc

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/datamining/covariance/covariance.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-e7060634372dc319d382649cf969bb65
+cd7b8424a3c3635d1ea90f42e415faa7

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.c Wed Jul  8 05:21:42 2015
@@ -54,13 +54,14 @@ void print_array(int ni, int nl,
 		 DATA_TYPE POLYBENCH_2D(D,NI,NL,ni,nl))
 {
   int i, j;
+  char *printmat = malloc(nl*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nl; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, D[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < nl; j++)
+      print_element(D[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-1545695c0f729449227b181c7785d63c
+f9f294040187318bc2cc477e7eecab01

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/2mm.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-2b8395f3686794ef2358eb60cd02ecbb
+68efcbd188b404f4fb09803b61c02f60

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.c Wed Jul  8 05:21:42 2015
@@ -50,13 +50,14 @@ void print_array(int ni, int nl,
 		 DATA_TYPE POLYBENCH_2D(G,NI,NL,ni,nl))
 {
   int i, j;
+  char *printmat = malloc(nl*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nl; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, G[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < nl; j++)
+      print_element(G[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-66eb54f857bc65f405ee520b4f181935
+f52121e0bccc072008e52a06798e05db

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/3mm.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-ca0d129828c9ad9902da52afe3748e44
+7779d064d80186d46a0d91b8f6116c62

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.c Wed Jul  8 05:21:42 2015
@@ -42,12 +42,12 @@ void print_array(int nx,
 
 {
   int i;
+  char *printmat = malloc(nx*8);
 
-  for (i = 0; i < nx; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, y[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
-  fprintf (stderr, "\n");
+  for (i = 0; i < nx; i++)
+    print_element(y[i], i*8, printmat);
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-d56aab8d63bea01bd7e864dd3406f266
+88a04eb3d01f6346a6ee4b678e311fe5

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.c Wed Jul  8 05:21:42 2015
@@ -46,16 +46,18 @@ void print_array(int nx, int ny,
 
 {
   int i;
+  int n = nx > ny ? nx : ny;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < ny; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, s[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
-  for (i = 0; i < nx; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, q[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ny; i++)
+    print_element(s[i], i*8, printmat);
+  *(printmat+i) = 0;
+  fputs(printmat, stderr);
+  for (i = 0; i < nx; i++)
+    print_element(q[i], i*8, printmat);
+  *(printmat+i) = 0;
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-cb5bae69c1a3653edab30d8bcf027bbf
+22fab907b016327a2808510b55959131

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.c Wed Jul  8 05:21:42 2015
@@ -54,12 +54,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, A[i][j]);
-    if ((i * N + j) % 20 == 0) fprintf (stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(A[i][j], j*8, printmat);
+    fputs(printmat, stderr);
   }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-1fb54fb516d4be7c0bb185f73c7d3292
+5da79cc798c356034dfdf5ac98b3ecaa

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/cholesky/cholesky.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-fc86853283ef65fd623fbd31159c2a65
+e9aaf9cf2963bd1cc5183174c0dfadc1

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.c Wed Jul  8 05:21:42 2015
@@ -43,14 +43,15 @@ void print_array(int nr, int nq, int np,
 		 DATA_TYPE POLYBENCH_3D(A,NR,NQ,NP,nr,nq,np))
 {
   int i, j, k;
+  char *printmat = malloc(np*8);
 
-  for (i = 0; i < nr; i++)
+  for (i = 0; i < nr; i++) {
     for (j = 0; j < nq; j++)
-      for (k = 0; k < np; k++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, A[i][j][k]);
-	if (i % 20 == 0) fprintf (stderr, "\n");
-      }
-  fprintf (stderr, "\n");
+      for (k = 0; k < np; k++)
+      print_element(A[i][j][k], k*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-65adf58a59d20588e34936ce58fd7e0f
+73c37cc505bf1b3706695ed80db85dbf

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/doitgen.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-6b853e964e12d02f8cf93a93f101eacd
+3c8a6a1e9fe6738b6d2d79335360194d

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.c Wed Jul  8 05:21:42 2015
@@ -50,13 +50,14 @@ void print_array(int ni, int nj,
 		 DATA_TYPE POLYBENCH_2D(C,NI,NJ,ni,nj))
 {
   int i, j;
+  char *printmat = malloc(nj*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nj; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, C[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < nj; j++)
+      print_element(C[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-8e49771874c426a32c3cf2f1f3aa0385
+622af90c831b234ea835317cd4bb4123

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemm/gemm.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-3361d8b76f26fc4d6ad4a8729d24d488
+8685643738936fe8ee951f5e06200e56

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/gemver.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/gemver.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/gemver.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/gemver.c Wed Jul  8 05:21:42 2015
@@ -61,7 +61,6 @@ void print_array(int n,
 		 DATA_TYPE POLYBENCH_1D(w,N,n))
 {
   int i;
-
   for (i = 0; i < n; i++) {
     fprintf (stderr, DATA_PRINTF_MODIFIER, w[i]);
     if (i % 20 == 0) fprintf (stderr, "\n");

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.c Wed Jul  8 05:21:42 2015
@@ -50,11 +50,12 @@ void print_array(int n,
 
 {
   int i;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, y[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
+  for (i = 0; i < n; i++)
+    print_element(y[i], i*8, printmat);
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-8cafbcc8e2ea63cccdf5de115af25744
+23b6382cb41cacbb93c669e92d7c4b7e

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-09469571af2ac7213418225f9dd07f68
+d0f71814a5109a3f373ed7587e6b0b0b

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.c Wed Jul  8 05:21:42 2015
@@ -50,12 +50,15 @@ void print_array(int n,
 
 {
   int i;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, x1[i]);
-    fprintf (stderr, DATA_PRINTF_MODIFIER, x2[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
+  for (i = 0; i < n; i++)
+    print_element(x1[i], i*8, printmat);
+  fputs(printmat, stderr);
+  for (i = 0; i < n; i++)
+    print_element(x2[i], i*8, printmat);
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-6b091f2008985d45dbdcf6c382fbd7b8
+74b403cb1904ef24879eeb0f8e031b4e

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.c Wed Jul  8 05:21:42 2015
@@ -49,13 +49,14 @@ void print_array(int ni, int nj,
 		 DATA_TYPE POLYBENCH_2D(C,NI,NJ,ni,nj))
 {
   int i, j;
+  char *printmat = malloc(nj*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nj; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, C[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < nj; j++)
+      print_element(C[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-a3ec0a2360baf0348b8ee4ba64fbf096
+e1dddd8c9c19bf9f1e7cbf0c239ce46a

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/symm/symm.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-c597648a5a55afed6a92eca9245c70bf
+7d05186f98518c24e49d2229c5e0ad1c

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.c Wed Jul  8 05:21:42 2015
@@ -49,13 +49,14 @@ void print_array(int ni,
 		 DATA_TYPE POLYBENCH_2D(C,NI,NI,ni,ni))
 {
   int i, j;
+  char *printmat = malloc(ni*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < ni; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, C[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < ni; j++)
+      print_element(C[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-00e3df1371e3f5b9576862a0f36ef565
+3c957bddeddf967b7ae73a4c4546e229

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syr2k/syr2k.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-6e337b7202d0024b09c3e7f6ff76f034
+5e7018090d8a48bc5171713008ad0831

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.c Wed Jul  8 05:21:42 2015
@@ -46,13 +46,14 @@ void print_array(int ni,
 		 DATA_TYPE POLYBENCH_2D(C,NI,NI,ni,ni))
 {
   int i, j;
+  char *printmat = malloc(ni*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < ni; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, C[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < ni; j++)
+      print_element(C[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-8e49771874c426a32c3cf2f1f3aa0385
+622af90c831b234ea835317cd4bb4123

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/syrk/syrk.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-3361d8b76f26fc4d6ad4a8729d24d488
+8685643738936fe8ee951f5e06200e56

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.c Wed Jul  8 05:21:42 2015
@@ -55,11 +55,12 @@ void print_array(int n,
 
 {
   int i;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++) {
-    fprintf (stderr, DATA_PRINTF_MODIFIER, x[i]);
-    if (i % 20 == 0) fprintf (stderr, "\n");
-  }
+  for (i = 0; i < n; i++)
+    print_element(x[i], i*8, printmat);
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-41151c37936a7c5c0ed56884b86b6270
+6b6b1c3ed0d6abeda5af3b76f89a3331

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.c Wed Jul  8 05:21:42 2015
@@ -43,13 +43,14 @@ void print_array(int ni,
 		 DATA_TYPE POLYBENCH_2D(B,NI,NI,ni,ni))
 {
   int i, j;
+  char *printmat = malloc(ni*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < ni; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, B[i][j]);
-	if ((i * ni + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < ni; j++)
+      print_element(B[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-fd1579a9f0ec5c2585fdc77df8e870cc
+93f3c10749d75b23e8a19b6931b48486

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trmm/trmm.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-be6096b5b46ba95633b79a710819fa55
+1d2d6c667c5f036d5e51428f5aed37ef

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.c Wed Jul  8 05:21:42 2015
@@ -50,7 +50,6 @@ void print_array(int n,
 
 {
   int i;
-
   for (i = 0; i < n; i++) {
     fprintf (stderr, DATA_PRINTF_MODIFIER, out[i]);
     if (i % 20 == 0) fprintf (stderr, "\n");

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c Wed Jul  8 05:21:42 2015
@@ -60,25 +60,20 @@ void print_array(int ni, int nj,
 		 DATA_TYPE POLYBENCH_2D(Q,NI,NJ,ni,nj))
 {
   int i, j;
+  char *printmat = malloc(nj*8);
 
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nj; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, A[i][j]);
-	if (i % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
-  for (i = 0; i < nj; i++)
-    for (j = 0; j < nj; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, R[i][j]);
-	if (i % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
-  for (i = 0; i < ni; i++)
-    for (j = 0; j < nj; j++) {
-	fprintf (stderr, DATA_PRINTF_MODIFIER, Q[i][j]);
-	if (i % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < ni; i++) {
+    for (j = 0; j < nj; j++)
+      print_element(A[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+    for (j = 0; j < nj; j++)
+      print_element(R[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+    for (j = 0; j < nj; j++)
+      print_element(Q[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-afd6148086976ac742f6e23d958a9abd
+8dad7c1bd410ad7972658a7a8f920174

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/gramschmidt/gramschmidt.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-2ef88c2dc96dfee9806c2e3436a724d9
+872192fedd8da0eb3a2ec5f0f5054b72

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.c Wed Jul  8 05:21:42 2015
@@ -39,13 +39,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-      fprintf (stderr, DATA_PRINTF_MODIFIER, A[i][j]);
-      if ((i * n + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(A[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-e755501e720addec3df7e4a44b31982c
+83a3b7d418f8e147ab88fa04966c7c37

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.c Wed Jul  8 05:21:42 2015
@@ -39,13 +39,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-      fprintf (stderr, DATA_PRINTF_MODIFIER, path[i][j]);
-      if ((i * n + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(path[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-1e06b1215b8234ad7dc8012e6c9ad7ab
+72d6ab856485d06c244c238122cd13a8

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/floyd-warshall/floyd-warshall.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-cb25ad8d996cd98b5033b75a49811c84
+90b8c539c785cf4ca34231d074058d43

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.c Wed Jul  8 05:21:42 2015
@@ -43,13 +43,14 @@ void print_array(int maxgrid,
 		 DATA_TYPE POLYBENCH_2D(path,MAXGRID,MAXGRID,maxgrid,maxgrid))
 {
   int i, j;
+  char *printmat = malloc(maxgrid*8);
 
-  for (i = 0; i < maxgrid; i++)
-    for (j = 0; j < maxgrid; j++) {
-      fprintf (stderr, DATA_PRINTF_MODIFIER, path[i][j]);
-      if ((i * maxgrid + j) % 20 == 0) fprintf (stderr, "\n");
-    }
-  fprintf (stderr, "\n");
+  for (i = 0; i < maxgrid; i++) {
+    for (j = 0; j < maxgrid; j++)
+      print_element(path[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-eef6cdaf9c1cdebe72d8f267816fad2d
+7f77e12e2f9cf5f1c34d7a8b3d684c52

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.c Wed Jul  8 05:21:42 2015
@@ -45,13 +45,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-      fprintf(stderr, DATA_PRINTF_MODIFIER, X[i][j]);
-      if ((i * N + j) % 20 == 0) fprintf(stderr, "\n");
-    }
-  fprintf(stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(X[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-af131f7f24a4d9666b459cb425f6c6d2
+1823d3f6cf83a9b28749d6edaa5fedc9

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/adi/adi.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-3d3f4195b44049d25bcad04741e9b671
+5182fd4f225bdeea7e9cb31766de5ee2

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.c Wed Jul  8 05:21:42 2015
@@ -52,15 +52,20 @@ void print_array(int nx,
 		 DATA_TYPE POLYBENCH_2D(hz,NX,NY,nx,ny))
 {
   int i, j;
+  char *printmat = malloc(ny*8);
 
-  for (i = 0; i < nx; i++)
-    for (j = 0; j < ny; j++) {
-      fprintf(stderr, DATA_PRINTF_MODIFIER, ex[i][j]);
-      fprintf(stderr, DATA_PRINTF_MODIFIER, ey[i][j]);
-      fprintf(stderr, DATA_PRINTF_MODIFIER, hz[i][j]);
-      if ((i * nx + j) % 20 == 0) fprintf(stderr, "\n");
-    }
-  fprintf(stderr, "\n");
+  for (i = 0; i < nx; i++) {
+    for (j = 0; j < ny; j++)
+      print_element(ex[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+    for (j = 0; j < ny; j++)
+      print_element(ey[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+    for (j = 0; j < ny; j++)
+      print_element(hz[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-a0c67eb784fcf1b38991d3c7ffe7381b
+70ea9d7528f3022d056656af4d540929

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-2d/fdtd-2d.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-9246a4ce3e2d09992a0bff0693f4ac3c
+cd41e645df13df9fa373727b6e285f64

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/fdtd-apml.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/fdtd-apml.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/fdtd-apml.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/fdtd-apml/fdtd-apml.c Wed Jul  8 05:21:42 2015
@@ -73,6 +73,9 @@ void init_array (int cz,
 
 /* DCE code. Must scan the entire live-out data.
    Can be used also to check the correctness of the output. */
+/* FIXME: This print_array method wasn't converted to use the
+   faster print_element method like the others because it's
+   not bit identical across platforms. It should be. */
 static
 void print_array(int cz,
 		 int cxm,
@@ -83,15 +86,14 @@ void print_array(int cz,
 		 DATA_TYPE POLYBENCH_3D(Hz,CZ+1,CYM+1,CXM+1,cz+1,cym+1,cxm+1))
 {
   int i, j, k;
-
   for (i = 0; i <= cz; i++)
     for (j = 0; j <= cym; j++)
       for (k = 0; k <= cxm; k++) {
-	fprintf(stderr, DATA_PRINTF_MODIFIER, Bza[i][j][k]);
-	fprintf(stderr, DATA_PRINTF_MODIFIER, Ex[i][j][k]);
-	fprintf(stderr, DATA_PRINTF_MODIFIER, Ey[i][j][k]);
-	fprintf(stderr, DATA_PRINTF_MODIFIER, Hz[i][j][k]);
-	if ((i * cxm + j) % 20 == 0) fprintf(stderr, "\n");
+       fprintf(stderr, DATA_PRINTF_MODIFIER, Bza[i][j][k]);
+       fprintf(stderr, DATA_PRINTF_MODIFIER, Ex[i][j][k]);
+       fprintf(stderr, DATA_PRINTF_MODIFIER, Ey[i][j][k]);
+       fprintf(stderr, DATA_PRINTF_MODIFIER, Hz[i][j][k]);
+       if ((i * cxm + j) % 20 == 0) fprintf(stderr, "\n");
       }
   fprintf(stderr, "\n");
 }

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.c Wed Jul  8 05:21:42 2015
@@ -42,13 +42,12 @@ void print_array(int n,
 
 {
   int i;
+  char *printmat = malloc(n*8);
 
   for (i = 0; i < n; i++)
-    {
-      fprintf(stderr, DATA_PRINTF_MODIFIER, A[i]);
-      if (i % 20 == 0) fprintf(stderr, "\n");
-    }
-  fprintf(stderr, "\n");
+    print_element(A[i], i*8, printmat);
+  fputs(printmat, stderr);
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d-imper/jacobi-1d-imper.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-2eddb1dbda3879a4038397cfc8bf9a61
+53110044128f4550e864b8dd19771ba2

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.c Wed Jul  8 05:21:42 2015
@@ -43,13 +43,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-      fprintf(stderr, DATA_PRINTF_MODIFIER, A[i][j]);
-      if ((i * n + j) % 20 == 0) fprintf(stderr, "\n");
-    }
-  fprintf(stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(A[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-61690122698707dc06d0f72e055fe42f
+58213157f3b250a08e33f260ecf70ee0

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper/jacobi-2d-imper.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-cc4e73b94e2b16da2a2cad3694c4bb8f
+6a17fdd70db1d0cab444fdb6e69c1363

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.c?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.c Wed Jul  8 05:21:42 2015
@@ -39,13 +39,14 @@ void print_array(int n,
 
 {
   int i, j;
+  char *printmat = malloc(n*8);
 
-  for (i = 0; i < n; i++)
-    for (j = 0; j < n; j++) {
-      fprintf(stderr, DATA_PRINTF_MODIFIER, A[i][j]);
-      if ((i * n + j) % 20 == 0) fprintf(stderr, "\n");
-    }
-  fprintf(stderr, "\n");
+  for (i = 0; i < n; i++) {
+    for (j = 0; j < n; j++)
+      print_element(A[i][j], j*8, printmat);
+    fputs(printmat, stderr);
+  }
+  free(printmat);
 }
 
 

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-73eaf8ec02cd5ecce448f83e00f93d1f
+58213157f3b250a08e33f260ecf70ee0

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output.small?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output.small (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/stencils/seidel-2d/seidel-2d.reference_output.small Wed Jul  8 05:21:42 2015
@@ -1 +1 @@
-cc4e73b94e2b16da2a2cad3694c4bb8f
+6a17fdd70db1d0cab444fdb6e69c1363

Modified: test-suite/trunk/SingleSource/Benchmarks/Polybench/utilities/polybench.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Polybench/utilities/polybench.h?rev=241675&r1=241674&r2=241675&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Polybench/utilities/polybench.h (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Polybench/utilities/polybench.h Wed Jul  8 05:21:42 2015
@@ -606,6 +606,27 @@ void* polybench_alloc_data(unsigned long
   return ret;
 }
 
+/* To avoid calling printf M*M times (and make it run
+   for a long time), we split the output into an encoded string,
+   and print it as a simple char pointer, M times. */
+static inline
+void print_element(float el, int pos, char *out)
+{
+  union {
+    float datum;
+    char bytes[4];
+  } block;
 
+  block.datum = el;
+  /* each nibble as a char, within the printable range */
+  *(out+pos)   = (block.bytes[0]&0xF0>>4)+'0';
+  *(out+pos+1) = (block.bytes[0]&0x0F)   +'0';
+  *(out+pos+2) = (block.bytes[1]&0xF0>>4)+'0';
+  *(out+pos+3) = (block.bytes[1]&0x0F)   +'0';
+  *(out+pos+4) = (block.bytes[2]&0xF0>>4)+'0';
+  *(out+pos+5) = (block.bytes[2]&0x0F)   +'0';
+  *(out+pos+6) = (block.bytes[3]&0xF0>>4)+'0';
+  *(out+pos+7) = (block.bytes[3]&0x0F)   +'0';
+}
 
 #endif /* !POLYBENCH_H */





More information about the llvm-commits mailing list