[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
This commit is contained in:
Roman Lebedev 2019-04-08 10:50:31 +00:00
parent 25de7691a0
commit eb1a156d7f
1 changed files with 5 additions and 0 deletions

View File

@ -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");