summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-05-15 13:07:05 +0000
committerClement Courbet <courbet@google.com>2018-05-15 13:07:05 +0000
commita66bfaa4c037ce4e64d24549a566ec5d29110577 (patch)
tree7feca562f099977213549d142ef968f2a1f581bc /llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
parent2aa395abcf4ef11b508b99ed5c9dc48c5278780d (diff)
downloadbcm5719-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.h')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index d6b93f4703a..cf9bcece99a 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
@@ -23,8 +23,14 @@
namespace exegesis {
-struct AsmTemplate {
- std::string Name;
+struct InstructionBenchmarkKey {
+ // The LLVM opcode name.
+ std::string OpcodeName;
+ // The benchmark mode.
+ std::string Mode;
+ // An opaque configuration, that can be used to separate several benchmarks of
+ // the same instruction under different configurations.
+ std::string Config;
};
struct BenchmarkMeasure {
@@ -35,12 +41,13 @@ struct BenchmarkMeasure {
// The result of an instruction benchmark.
struct InstructionBenchmark {
- AsmTemplate AsmTmpl;
+ InstructionBenchmarkKey Key;
std::string CpuName;
std::string LLVMTriple;
int NumRepetitions = 0;
std::vector<BenchmarkMeasure> Measurements;
std::string Error;
+ std::string Info;
static InstructionBenchmark readYamlOrDie(llvm::StringRef Filename);
static std::vector<InstructionBenchmark> readYamlsOrDie(llvm::StringRef Filename);
OpenPOWER on IntegriCloud