diff options
author | Tom Stellard <tstellar@redhat.com> | 2021-07-27 01:52:13 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2021-07-26 22:07:07 -0700 |
commit | dbefcde6da1b58eb181dcbd8d7913175b2ec8350 (patch) | |
tree | d8bb1d0333027b1070caddb6dd47cf9425db86f8 /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | f0d41b58da4a102452af47c7b420577bd3d47a03 (diff) | |
download | llvm-dbefcde6da1b58eb181dcbd8d7913175b2ec8350.zip llvm-dbefcde6da1b58eb181dcbd8d7913175b2ec8350.tar.gz llvm-dbefcde6da1b58eb181dcbd8d7913175b2ec8350.tar.bz2 |
Merge all the llvm-exegesis unit tests into a single binary
These tests access private symbols in the backends, so they cannot link
against libLLVM.so and must be statically linked. Linking these tests
can be slow and with debug builds the resulting binaries use a lot of
disk space.
By merging them into a single test binary means we now only need to
statically link 1 test instead of 6, which helps reduce the build
times and saves disk space.
Reviewed By: courbet
Differential Revision: https://reviews.llvm.org/D106464
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 4a4c2d6f..dbf0769 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -423,5 +423,11 @@ void PerInstructionStats::push(const BenchmarkMeasure &BM) { MinValue = std::min(MinValue, BM.PerInstructionValue); } +bool operator==(const BenchmarkMeasure &A, const BenchmarkMeasure &B) { + return std::tie(A.Key, A.PerInstructionValue, A.PerSnippetValue) == + std::tie(B.Key, B.PerInstructionValue, B.PerSnippetValue); +} + + } // namespace exegesis } // namespace llvm |