[Polybench] Honour SMALL_PROBLEM_SIZE consistently

Some, but not all, of the Polybench benchmarks translate the
SMALL_PROBLEM_SIZE CMake option to the SMALL_DATASET preprocessor
define. This patch adds the necessary wiring for all those that didn't,
and adds the corresponding small reference outputs. This makes a
particular difference for lu, ludcmp, and heat-3d.
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/CMakeLists.txt
index f1b82ec..6310f6c 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 # Floating point contraction must be suppressed due to accuracy issues
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/gemver.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/gemver.reference_output.small
new file mode 100644
index 0000000..feafa32
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/blas/gemver/gemver.reference_output.small
@@ -0,0 +1 @@
+f035a8aa25c7d180eaa50ee6d9989c84
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/CMakeLists.txt
index f1b82ec..6310f6c 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 # Floating point contraction must be suppressed due to accuracy issues
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output.small
new file mode 100644
index 0000000..61335b2
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/atax.reference_output.small
@@ -0,0 +1 @@
+62e62b544df26c1fbd37bce749b9cd92
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/CMakeLists.txt
index f1b82ec..6310f6c 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 # Floating point contraction must be suppressed due to accuracy issues
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output.small
new file mode 100644
index 0000000..caa8b0a
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/bicg.reference_output.small
@@ -0,0 +1 @@
+f51fda66e7a22e7172dee5508385cf03
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output.small
new file mode 100644
index 0000000..a8adfab
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/mvt.reference_output.small
@@ -0,0 +1 @@
+85ca1174385d310bdf90908ca0c66817
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.reference_output.small
new file mode 100644
index 0000000..f63b1ec
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/durbin.reference_output.small
@@ -0,0 +1 @@
+942ab792344b5081787322090e214f6d
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output.small
new file mode 100644
index 0000000..ee53361
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/lu/lu.reference_output.small
@@ -0,0 +1 @@
+e2649d57d9932cef7bd52cbf8ae31095
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/ludcmp.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/ludcmp.reference_output.small
new file mode 100644
index 0000000..1edfa29
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/ludcmp/ludcmp.reference_output.small
@@ -0,0 +1 @@
+7fa20824d869cc6d1db66f205d94a5e8
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/CMakeLists.txt
index d6da32e..a8f4f92 100644
--- a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 # Floating point contraction must be suppressed due to accuracy issues
 list(APPEND CXXFLAGS -ffp-contract=off -DFMA_DISABLED=1)
diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/trisolv.reference_output.small b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/trisolv.reference_output.small
new file mode 100644
index 0000000..1c10d76
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/trisolv/trisolv.reference_output.small
@@ -0,0 +1 @@
+453ea574513c1c8bb0a713b9969389bd
diff --git a/SingleSource/Benchmarks/Polybench/stencils/heat-3d/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/stencils/heat-3d/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/stencils/heat-3d/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/stencils/heat-3d/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/stencils/heat-3d/heat-3d.reference_output.small b/SingleSource/Benchmarks/Polybench/stencils/heat-3d/heat-3d.reference_output.small
new file mode 100644
index 0000000..afe3c8e
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/stencils/heat-3d/heat-3d.reference_output.small
@@ -0,0 +1 @@
+d6dfe4344e48f0b9f84858e0c6f0080f
diff --git a/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/CMakeLists.txt b/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/CMakeLists.txt
index 9b102d9..cc33024 100644
--- a/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/CMakeLists.txt
+++ b/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/CMakeLists.txt
@@ -1,5 +1,8 @@
 set(POLYBENCH_UTILS SingleSource/Benchmarks/Polybench/utilities )
 list(APPEND CFLAGS -I ${CMAKE_SOURCE_DIR}/${POLYBENCH_UTILS} -DPOLYBENCH_DUMP_ARRAYS)
+if(SMALL_PROBLEM_SIZE)
+  list(APPEND CFLAGS -DSMALL_DATASET)
+endif()
 set(HASH_PROGRAM_OUTPUT 1)
 add_definitions(-DFP_ABSTOLERANCE=1e-5)
 llvm_singlesource()
diff --git a/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/jacobi-1d.reference_output.small b/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/jacobi-1d.reference_output.small
new file mode 100644
index 0000000..7c5d13f
--- /dev/null
+++ b/SingleSource/Benchmarks/Polybench/stencils/jacobi-1d/jacobi-1d.reference_output.small
@@ -0,0 +1 @@
+a39581707cbc02ff89bbe26945afdfe9