forked from OSchip/llvm-project
[OldPM] Print out a bit more when passes lie about changing IR
https://reviews.llvm.org/D84686
This commit is contained in:
parent
97b5fb78d1
commit
736423af53
|
@ -1586,9 +1586,12 @@ bool FPPassManager::runOnFunction(Function &F) {
|
|||
#endif
|
||||
LocalChanged |= FP->runOnFunction(F);
|
||||
|
||||
#ifdef EXPENSIVE_CHECKS
|
||||
assert((LocalChanged || (RefHash == StructuralHash(F))) &&
|
||||
"Pass modifies its input and doesn't report it.");
|
||||
#if defined(EXPENSIVE_CHECKS) && !defined(NDEBUG)
|
||||
if (!LocalChanged && (RefHash != StructuralHash(F))) {
|
||||
llvm::errs() << "Pass modifies its input and doesn't report it: "
|
||||
<< FP->getPassName() << "\n";
|
||||
assert(false && "Pass modifies its input and doesn't report it.");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (EmitICRemark) {
|
||||
|
|
Loading…
Reference in New Issue