Skip to content

Commit eb1a156

Browse files
committed
[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
1 parent 25de769 commit eb1a156

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/tools/llvm-exegesis/llvm-exegesis.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ readSnippets(const LLVMState &State, llvm::StringRef Filename) {
359359
}
360360

361361
void benchmarkMain() {
362+
#ifndef HAVE_LIBPFM
363+
llvm::report_fatal_error(
364+
"benchmarking unavaliable, LLVM was built without libpfm.");
365+
#endif
366+
362367
if (exegesis::pfm::pfmInitialize())
363368
llvm::report_fatal_error("cannot initialize libpfm");
364369

0 commit comments

Comments
 (0)