[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
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index 9b87482..421e210 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
@@ -34,8 +34,6 @@
// The LLVM opcode name.
std::string OpcodeName; // FIXME: Deprecated, use Instructions below.
std::vector<llvm::MCInst> Instructions;
- enum ModeE { Unknown, Latency, Uops };
- ModeE Mode;
// An opaque configuration, that can be used to separate several benchmarks of
// the same instruction under different configurations.
std::string Config;
@@ -50,6 +48,8 @@
// The result of an instruction benchmark.
struct InstructionBenchmark {
InstructionBenchmarkKey Key;
+ enum ModeE { Unknown, Latency, Uops };
+ ModeE Mode;
std::string CpuName;
std::string LLVMTriple;
int NumRepetitions = 0;