[Unswitch] Guard dbgs logging with LLVM_DEBUG

This commit is contained in:
Arthur Eubanks 2021-03-16 22:29:40 -07:00
parent 506df1bbfd
commit 70af2924a7
1 changed files with 4 additions and 2 deletions

View File

@ -2684,11 +2684,13 @@ unswitchBestCondition(Loop &L, DominatorTree &DT, LoopInfo &LI,
// don't know how to split those exit blocks.
// FIXME: We should teach SplitBlock to handle this and remove this
// restriction.
for (auto *ExitBB : ExitBlocks)
for (auto *ExitBB : ExitBlocks) {
if (isa<CleanupPadInst>(ExitBB->getFirstNonPHI())) {
dbgs() << "Cannot unswitch because of cleanuppad in exit block\n";
LLVM_DEBUG(
dbgs() << "Cannot unswitch because of cleanuppad in exit block\n");
return false;
}
}
LLVM_DEBUG(
dbgs() << "Considering " << UnswitchCandidates.size()