[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/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
index bf13272..df353dc 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
@@ -319,9 +319,8 @@
   std::vector<BenchmarkMeasure> SchedClassPoint(NumMeasurements);
   // Latency case.
   assert(!Clustering.getPoints().empty());
-  const InstructionBenchmarkKey::ModeE Mode =
-      Clustering.getPoints()[0].Key.Mode;
-  if (Mode == InstructionBenchmarkKey::Latency) {
+  const InstructionBenchmark::ModeE Mode = Clustering.getPoints()[0].Mode;
+  if (Mode == InstructionBenchmark::Latency) {
     if (NumMeasurements != 1) {
       llvm::errs()
           << "invalid number of measurements in latency mode: expected 1, got "
@@ -337,7 +336,7 @@
           std::max<double>(SchedClassPoint[0].Value, WLE->Cycles);
     }
     ClusterCenterPoint[0].Value = Representative[0].avg();
-  } else if (Mode == InstructionBenchmarkKey::Uops) {
+  } else if (Mode == InstructionBenchmark::Uops) {
     for (int I = 0, E = Representative.size(); I < E; ++I) {
       // Find the pressure on ProcResIdx `Key`.
       uint16_t ProcResIdx = 0;