diff options
author | Clement Courbet <courbet@google.com> | 2018-04-04 12:01:38 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-04-04 12:01:38 +0000 |
commit | 3f20fee55cc17bdb8a5e10d2e6661701df42c424 (patch) | |
tree | 952b5ed060ac8e53670e9eac99e5dad8196dc4a6 | |
parent | 378d75ac17a960e12fe89b77ae50e135cb109f6b (diff) | |
download | bcm5719-llvm-3f20fee55cc17bdb8a5e10d2e6661701df42c424.tar.gz bcm5719-llvm-3f20fee55cc17bdb8a5e10d2e6661701df42c424.zip |
[llvm-exegesis][NFC] Fix a few warnings.
llvm-svn: 329174
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/Latency.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/PerfHelper.h | 3 | ||||
-rw-r--r-- | llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Latency.cpp b/llvm/tools/llvm-exegesis/lib/Latency.cpp index b28b81cc940..770b928112e 100644 --- a/llvm/tools/llvm-exegesis/lib/Latency.cpp +++ b/llvm/tools/llvm-exegesis/lib/Latency.cpp @@ -89,7 +89,7 @@ LatencyBenchmarkRunner::runMeasurements(const LLVMState &State, if (Value < MinLatency) MinLatency = Value; } - return {{"latency", static_cast<double>(MinLatency) / NumRepetitions}}; + return {{"latency", static_cast<double>(MinLatency) / NumRepetitions, ""}}; } } // namespace exegesis diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.h b/llvm/tools/llvm-exegesis/lib/PerfHelper.h index 22da2061c52..8c3f13e6c5c 100644 --- a/llvm/tools/llvm-exegesis/lib/PerfHelper.h +++ b/llvm/tools/llvm-exegesis/lib/PerfHelper.h @@ -17,6 +17,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" +#include "llvm/Config/config.h" #include <functional> #include <memory> @@ -76,7 +77,9 @@ struct Counter { int64_t read() const; // Return the current value of the counter. private: +#ifdef HAVE_LIBPFM int FileDescriptor = -1; +#endif }; // Helper to measure a list of PerfEvent for a particular function. diff --git a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp index 577b956f68d..5b3277dc7e2 100644 --- a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp +++ b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp @@ -31,7 +31,7 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { ToDisk.LLVMTriple = "llvm_triple"; ToDisk.NumRepetitions = 1; ToDisk.Measurements.push_back(BenchmarkMeasure{"a", 1, "debug a"}); - ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2}); + ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2, ""}); ToDisk.Error = "error"; const llvm::StringRef Filename("data.yaml"); |