summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-07-05 13:54:51 +0000
committerClement Courbet <courbet@google.com>2018-07-05 13:54:51 +0000
commitf9a0bb330d8bb029d01ffe3d2e8fc0049b54ae0a (patch)
treefa9cb38e81aee40fd69992efdb3a358394fbc6d6 /llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
parent9e987e09174b9f56ddc30a6aae87dc3a7b797209 (diff)
downloadbcm5719-llvm-f9a0bb330d8bb029d01ffe3d2e8fc0049b54ae0a.tar.gz
bcm5719-llvm-f9a0bb330d8bb029d01ffe3d2e8fc0049b54ae0a.zip
[llvm-exegesis] Add uop computation for more X87 instruction classes.
Summary: This allows measuring comparisons (UCOM_FpIr32,UCOM_Fpr32,...), conditional moves (CMOVBE_Fp32,...) Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48713 llvm-svn: 336352
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index 638dc195f1f..55012bc1e83 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -196,8 +196,8 @@ BenchmarkRunner::writeObjectFile(const BenchmarkConfiguration::Setup &Setup,
return ResultPath.str();
}
-llvm::Expected<SnippetPrototype> BenchmarkRunner::generateSelfAliasingPrototype(
- const Instruction &Instr) const {
+llvm::Expected<SnippetPrototype>
+BenchmarkRunner::generateSelfAliasingPrototype(const Instruction &Instr) const {
const AliasingConfigurations SelfAliasing(Instr, Instr);
if (SelfAliasing.empty()) {
return llvm::make_error<BenchmarkFailure>("empty self aliasing");
@@ -217,4 +217,13 @@ llvm::Expected<SnippetPrototype> BenchmarkRunner::generateSelfAliasingPrototype(
return std::move(Prototype);
}
+llvm::Expected<SnippetPrototype>
+BenchmarkRunner::generateUnconstrainedPrototype(const Instruction &Instr,
+ llvm::StringRef Msg) const {
+ SnippetPrototype Prototype;
+ Prototype.Explanation =
+ llvm::formatv("{0}, repeating an unconstrained assignment", Msg);
+ Prototype.Snippet.emplace_back(Instr);
+ return std::move(Prototype);
+}
} // namespace exegesis
OpenPOWER on IntegriCloud