[llvm] r357900 - [llvm-exegesis] benchmarkMain(): less cryptic error if built w/o libpfm
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 03:50:32 PDT 2019
Author: lebedevri
Date: Mon Apr 8 03:50:31 2019
New Revision: 357900
URL: http://llvm.org/viewvc/llvm-project?rev=357900&view=rev
Log:
[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.
Modified:
llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
Modified: llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp?rev=357900&r1=357899&r2=357900&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp Mon Apr 8 03:50:31 2019
@@ -359,6 +359,11 @@ readSnippets(const LLVMState &State, llv
}
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");
More information about the llvm-commits
mailing list