diff options
author | Clement Courbet <courbet@google.com> | 2018-05-15 13:07:05 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-05-15 13:07:05 +0000 |
commit | a66bfaa4c037ce4e64d24549a566ec5d29110577 (patch) | |
tree | 7feca562f099977213549d142ef968f2a1f581bc /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | 2aa395abcf4ef11b508b99ed5c9dc48c5278780d (diff) | |
download | bcm5719-llvm-a66bfaa4c037ce4e64d24549a566ec5d29110577.tar.gz bcm5719-llvm-a66bfaa4c037ce4e64d24549a566ec5d29110577.zip |
[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
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index dcc798d71c0..a043ea40c27 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -34,20 +34,23 @@ template <> struct MappingTraits<exegesis::BenchmarkMeasure> { 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); } }; |