diff options
author | Clement Courbet <courbet@google.com> | 2018-06-06 09:42:36 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-06-06 09:42:36 +0000 |
commit | 62b34fa89a9cabfebe56848e25be4413ee009520 (patch) | |
tree | 445956971d8c96465c4ec3aa81652f78cd289b4f /llvm/unittests/tools/llvm-exegesis | |
parent | 57f661bd7d20412f21ac6b7611c41a0f8b84fc01 (diff) | |
download | bcm5719-llvm-62b34fa89a9cabfebe56848e25be4413ee009520.tar.gz bcm5719-llvm-62b34fa89a9cabfebe56848e25be4413ee009520.zip |
[llvm-exegesis] move Mode from Key to BenchmarResult.
Moves the Mode field out of the Key. The existing yaml benchmark results can be fixed with the following script:
```
readonly FILE=$1
readonly MODE=latency # Change to uops to fix a uops benchmark.
cat $FILE | \
sed "/^\ \+mode:\ \+$MODE$/d" | \
sed "/^cpu_name.*$/i mode: $MODE"
```
Differential Revision: https://reviews.llvm.org/D47813
Authored by: Guillaume Chatelet
llvm-svn: 334079
Diffstat (limited to 'llvm/unittests/tools/llvm-exegesis')
-rw-r--r-- | llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp index 2c12c82d2f4..181b5afc34b 100644 --- a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp +++ b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp @@ -45,8 +45,8 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { ToDisk.Key.OpcodeName = "name"; ToDisk.Key.Instructions.push_back(llvm::MCInstBuilder(kInstrId)); - ToDisk.Key.Mode = InstructionBenchmarkKey::Latency; ToDisk.Key.Config = "config"; + ToDisk.Mode = InstructionBenchmark::Latency; ToDisk.CpuName = "cpu_name"; ToDisk.LLVMTriple = "llvm_triple"; ToDisk.NumRepetitions = 1; @@ -69,8 +69,8 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { EXPECT_EQ(FromDisk.Key.OpcodeName, ToDisk.Key.OpcodeName); EXPECT_THAT(FromDisk.Key.Instructions, Pointwise(EqMCInst(), ToDisk.Key.Instructions)); - EXPECT_EQ(FromDisk.Key.Mode, ToDisk.Key.Mode); EXPECT_EQ(FromDisk.Key.Config, ToDisk.Key.Config); + EXPECT_EQ(FromDisk.Mode, ToDisk.Mode); EXPECT_EQ(FromDisk.CpuName, ToDisk.CpuName); EXPECT_EQ(FromDisk.LLVMTriple, ToDisk.LLVMTriple); EXPECT_EQ(FromDisk.NumRepetitions, ToDisk.NumRepetitions); @@ -87,8 +87,8 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { EXPECT_EQ(FromDisk.Key.OpcodeName, ToDisk.Key.OpcodeName); EXPECT_THAT(FromDisk.Key.Instructions, Pointwise(EqMCInst(), ToDisk.Key.Instructions)); - EXPECT_EQ(FromDisk.Key.Mode, ToDisk.Key.Mode); EXPECT_EQ(FromDisk.Key.Config, ToDisk.Key.Config); + EXPECT_EQ(FromDisk.Mode, ToDisk.Mode); EXPECT_EQ(FromDisk.CpuName, ToDisk.CpuName); EXPECT_EQ(FromDisk.LLVMTriple, ToDisk.LLVMTriple); EXPECT_EQ(FromDisk.NumRepetitions, ToDisk.NumRepetitions); |