summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Target.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2019-10-08 14:30:24 +0000
committerClement Courbet <courbet@google.com>2019-10-08 14:30:24 +0000
commit2cd0f2895946de546d066f67c88ff365d3210017 (patch)
tree1dde8cff5615fac6906b453afef96f2fb7fbc685 /llvm/tools/llvm-exegesis/lib/Target.cpp
parentcf3ab6d96c3e9477b05bbbe8b525151320e96d71 (diff)
downloadbcm5719-llvm-2cd0f2895946de546d066f67c88ff365d3210017.tar.gz
bcm5719-llvm-2cd0f2895946de546d066f67c88ff365d3210017.zip
[llvm-exegesis] Add options to SnippetGenerator.
Summary: This adds a `-max-configs-per-opcode` option to limit the number of configs per opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68642 llvm-svn: 374054
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Target.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Target.cpp b/llvm/tools/llvm-exegesis/lib/Target.cpp
index a5ba24c20f2..7e27627c98c 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Target.cpp
@@ -36,17 +36,17 @@ void ExegesisTarget::registerTarget(ExegesisTarget *Target) {
FirstTarget = Target;
}
-std::unique_ptr<SnippetGenerator>
-ExegesisTarget::createSnippetGenerator(InstructionBenchmark::ModeE Mode,
- const LLVMState &State) const {
+std::unique_ptr<SnippetGenerator> ExegesisTarget::createSnippetGenerator(
+ InstructionBenchmark::ModeE Mode, const LLVMState &State,
+ const SnippetGenerator::Options &Opts) const {
switch (Mode) {
case InstructionBenchmark::Unknown:
return nullptr;
case InstructionBenchmark::Latency:
- return createLatencySnippetGenerator(State);
+ return createLatencySnippetGenerator(State, Opts);
case InstructionBenchmark::Uops:
case InstructionBenchmark::InverseThroughput:
- return createUopsSnippetGenerator(State);
+ return createUopsSnippetGenerator(State, Opts);
}
return nullptr;
}
@@ -66,14 +66,14 @@ ExegesisTarget::createBenchmarkRunner(InstructionBenchmark::ModeE Mode,
return nullptr;
}
-std::unique_ptr<SnippetGenerator>
-ExegesisTarget::createLatencySnippetGenerator(const LLVMState &State) const {
- return std::make_unique<LatencySnippetGenerator>(State);
+std::unique_ptr<SnippetGenerator> ExegesisTarget::createLatencySnippetGenerator(
+ const LLVMState &State, const SnippetGenerator::Options &Opts) const {
+ return std::make_unique<LatencySnippetGenerator>(State, Opts);
}
-std::unique_ptr<SnippetGenerator>
-ExegesisTarget::createUopsSnippetGenerator(const LLVMState &State) const {
- return std::make_unique<UopsSnippetGenerator>(State);
+std::unique_ptr<SnippetGenerator> ExegesisTarget::createUopsSnippetGenerator(
+ const LLVMState &State, const SnippetGenerator::Options &Opts) const {
+ return std::make_unique<UopsSnippetGenerator>(State, Opts);
}
std::unique_ptr<BenchmarkRunner> ExegesisTarget::createLatencyBenchmarkRunner(
OpenPOWER on IntegriCloud