summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2019-09-30 13:53:50 +0000
committerClement Courbet <courbet@google.com>2019-09-30 13:53:50 +0000
commit03a3d29541d8652b30e96eee9fa139c234bb7b60 (patch)
treed4ebecdf5ce8febf8fff74cc85ef94cc6b6f3561 /llvm/tools/llvm-exegesis/llvm-exegesis.cpp
parent6f23a68a84c0cb25bd3009758f62367fd475ed24 (diff)
downloadbcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.tar.gz
bcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.zip
[llvm-exegesis][NFC] Move BenchmarkFailure to own file.
Summary: And rename to exegesis::Failure, as it's used everytwhere. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68217 llvm-svn: 373209
Diffstat (limited to 'llvm/tools/llvm-exegesis/llvm-exegesis.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/llvm-exegesis.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 501f6217fd0..616b7c96232 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -15,6 +15,7 @@
#include "lib/BenchmarkResult.h"
#include "lib/BenchmarkRunner.h"
#include "lib/Clustering.h"
+#include "lib/Error.h"
#include "lib/LlvmState.h"
#include "lib/PerfHelper.h"
#include "lib/SnippetFile.h"
@@ -207,13 +208,11 @@ generateSnippets(const LLVMState &State, unsigned Opcode,
const llvm::MCInstrDesc &InstrDesc = *Instr.Description;
// Ignore instructions that we cannot run.
if (InstrDesc.isPseudo())
- return llvm::make_error<BenchmarkFailure>("Unsupported opcode: isPseudo");
+ return make_error<Failure>("Unsupported opcode: isPseudo");
if (InstrDesc.isBranch() || InstrDesc.isIndirectBranch())
- return llvm::make_error<BenchmarkFailure>(
- "Unsupported opcode: isBranch/isIndirectBranch");
+ return make_error<Failure>("Unsupported opcode: isBranch/isIndirectBranch");
if (InstrDesc.isCall() || InstrDesc.isReturn())
- return llvm::make_error<BenchmarkFailure>(
- "Unsupported opcode: isCall/isReturn");
+ return make_error<Failure>("Unsupported opcode: isCall/isReturn");
const std::unique_ptr<SnippetGenerator> Generator =
State.getExegesisTarget().createSnippetGenerator(BenchmarkMode, State);
OpenPOWER on IntegriCloud