summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-04-08 10:50:31 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-04-08 10:50:31 +0000
commiteb1a156d7f7ba56ea8f9a26da36e6a93d1e98bda (patch)
treeb7b9a7675d83f42ab506f70db6576bce8773ad55 /llvm
parent25de7691a0e27c29c8d783a22373cc265571f5e9 (diff)
downloadbcm5719-llvm-eb1a156d7f7ba56ea8f9a26da36e6a93d1e98bda.tar.gz
bcm5719-llvm-eb1a156d7f7ba56ea8f9a26da36e6a93d1e98bda.zip
[llvm-exegesis] benchmarkMain(): less cryptic error if built w/o libpfm
Wanted to check if inablility to measure latency of CMOV32rm is a regression from D60041 / D60138, but unable to do that because the llvm-exegesis-{8,9} from debian sid fails with that cryptic, unhelpful error. I suspect this will be a better error. llvm-svn: 357900
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/llvm-exegesis/llvm-exegesis.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 7339baf8f8e..ed8ab6fc3f0 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -359,6 +359,11 @@ readSnippets(const LLVMState &State, llvm::StringRef Filename) {
}
void benchmarkMain() {
+#ifndef HAVE_LIBPFM
+ llvm::report_fatal_error(
+ "benchmarking unavaliable, LLVM was built without libpfm.");
+#endif
+
if (exegesis::pfm::pfmInitialize())
llvm::report_fatal_error("cannot initialize libpfm");
OpenPOWER on IntegriCloud