[test-suite] r332248 - [test-suite][ubsan] Remove UB in XSBench IO.
Brian Homerding via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 08:00:28 PDT 2018
Author: homerdin
Date: Mon May 14 08:00:27 2018
New Revision: 332248
URL: http://llvm.org/viewvc/llvm-project?rev=332248&view=rev
Log:
[test-suite][ubsan] Remove UB in XSBench IO.
The test-suite version of XSBench does not collect its own timing results.
This patch removes the calculation of a lookups/sec (with sec always == 0.0)
metric which is not reported in the test-suite.
Modified:
test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h
test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c
Modified: test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h?rev=332248&r1=332247&r2=332248&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h (original)
+++ test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h Mon May 14 08:00:27 2018
@@ -22,7 +22,9 @@
// I/O Specifiers
#define INFO 0
#define DEBUG 0
+#ifdef TIMING
#define SAVE 0
+#endif
// Structures
typedef struct{
Modified: test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c?rev=332248&r1=332247&r2=332248&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c Mon May 14 08:00:27 2018
@@ -39,9 +39,11 @@ void center_print(const char *s, int wid
void print_results( Inputs in, int mype, double runtime, int nprocs,
unsigned long long vhash )
{
+ #ifdef TIMING
// Calculate Lookups per sec
int lookups_per_sec = (int) ((double) in.lookups / runtime);
-
+ #endif
+
// If running in MPI, reduce timing statistics and calculate average
#ifdef MPI
int total_lookups = 0;
@@ -80,6 +82,7 @@ void print_results( Inputs in, int mype,
#endif
border_print();
+ #ifdef TIMING
// For bechmarking, output lookup/s data to file
if( SAVE )
{
@@ -87,6 +90,7 @@ void print_results( Inputs in, int mype,
fprintf(out, "%d\t%d\n", in.nthreads, lookups_per_sec);
fclose(out);
}
+ #endif
}
}
More information about the llvm-commits
mailing list