[llvm-exegesis] Split AsmTemplate.Name into components.

Summary:
AsmTemplate becomes IntructionBenchmarkKey, which has three components.
This allows retreiving the opcode for analysis.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D46873

llvm-svn: 332348
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index dcc798d..a043ea4 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -34,20 +34,23 @@
   static const bool flow = true;
 };
 
-template <> struct MappingTraits<exegesis::AsmTemplate> {
-  static void mapping(IO &Io, exegesis::AsmTemplate &Obj) {
-    Io.mapRequired("name", Obj.Name);
+template <> struct MappingTraits<exegesis::InstructionBenchmarkKey> {
+  static void mapping(IO &Io, exegesis::InstructionBenchmarkKey &Obj) {
+    Io.mapRequired("opcode_name", Obj.OpcodeName);
+    Io.mapRequired("mode", Obj.Mode);
+    Io.mapOptional("config", Obj.Config);
   }
 };
 
 template <> struct MappingTraits<exegesis::InstructionBenchmark> {
   static void mapping(IO &Io, exegesis::InstructionBenchmark &Obj) {
-    Io.mapRequired("asm_template", Obj.AsmTmpl);
+    Io.mapRequired("key", Obj.Key);
     Io.mapRequired("cpu_name", Obj.CpuName);
     Io.mapRequired("llvm_triple", Obj.LLVMTriple);
     Io.mapRequired("num_repetitions", Obj.NumRepetitions);
     Io.mapRequired("measurements", Obj.Measurements);
     Io.mapRequired("error", Obj.Error);
+    Io.mapOptional("info", Obj.Info);
   }
 };