[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.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index d6b93f4..cf9bcec 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 @@
// 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);