[llvm-exegesis] Add throughput mode.
Summary:
This just uses the latency benchmark runner on the parallel uops snippet
generator.
Fixes PR37698.
Reviewers: gchatelet
Subscribers: tschuett, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D57000
llvm-svn: 352632
diff --git a/llvm/tools/llvm-exegesis/lib/Target.cpp b/llvm/tools/llvm-exegesis/lib/Target.cpp
index 1fb0237..c662f1f 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Target.cpp
@@ -45,6 +45,7 @@
case InstructionBenchmark::Latency:
return createLatencySnippetGenerator(State);
case InstructionBenchmark::Uops:
+ case InstructionBenchmark::InverseThroughput:
return createUopsSnippetGenerator(State);
}
return nullptr;
@@ -57,7 +58,8 @@
case InstructionBenchmark::Unknown:
return nullptr;
case InstructionBenchmark::Latency:
- return createLatencyBenchmarkRunner(State);
+ case InstructionBenchmark::InverseThroughput:
+ return createLatencyBenchmarkRunner(State, Mode);
case InstructionBenchmark::Uops:
return createUopsBenchmarkRunner(State);
}
@@ -74,9 +76,9 @@
return llvm::make_unique<UopsSnippetGenerator>(State);
}
-std::unique_ptr<BenchmarkRunner>
-ExegesisTarget::createLatencyBenchmarkRunner(const LLVMState &State) const {
- return llvm::make_unique<LatencyBenchmarkRunner>(State);
+std::unique_ptr<BenchmarkRunner> ExegesisTarget::createLatencyBenchmarkRunner(
+ const LLVMState &State, InstructionBenchmark::ModeE Mode) const {
+ return llvm::make_unique<LatencyBenchmarkRunner>(State, Mode);
}
std::unique_ptr<BenchmarkRunner>