[LLVMdev] LLVM (opt) -profile-verifier is not pass resilient
Milind Chabbi
Milind.Chabbi at rice.edu
Tue Jul 30 08:22:29 PDT 2013
I compiled SPEC CPU2006 bzip2 with Clang, and generated profiles with
OPT's -insert-optimal-edge-profiling option.
After a profile run, I launched OPT with -profile-loader
-profile-verifier flags and also passed -O3 flag. This caused OPT to
give a warning "WARNING: profile information is inconsistent with the
current program!" and then fail with an assert (ASSERT:inWeight and
outWeight do not match
opt: ProfileVerifierPass.cpp:226:
void<unnamed>::ProfileVerifierPassT<FType, BType>::CheckValue(bool,
const char*, <unnamed>::ProfileVerifierPassT<FType,
BType>::DetailedBlockInfo*) [with FType = llvm::Function, BType =
llvm::BasicBlock]: Assertion `0 && (Message)' failed.)
Instead of passing -O3, if I pass only one optimization pass with the
profile, then there is no warning/assert in the profile verification.
Is this because different passes of -O3 are modifying the CGF that
makes it inconsistent with the originally produced profile?
Is this expected behavior?
Can't we make profiles (and profile verification) resilient to transformations ?
-Milind
More information about the llvm-dev
mailing list