Skip to content

Commit

Permalink
[CSI] Ignore unreachable basic blocks for instrumentation. Remove deb…
Browse files Browse the repository at this point in the history
…ug statement to fix issue #129.
  • Loading branch information
neboat committed Aug 26, 2022
1 parent 7c77aeb commit 602a75a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2462,6 +2462,8 @@ void CSIImpl::instrumentFunction(Function &F) {
// Ignore Tapir placeholder basic blocks
if (&F.getEntryBlock() != &BB && isTapirPlaceholderSuccessor(&BB))
continue;
if (!DT->isReachableFromEntry(&BB))
continue;
SmallVector<Instruction *, 8> BBLoadsAndStores;
for (Instruction &I : BB) {
if (isAtomic(&I))
Expand All @@ -2475,7 +2477,6 @@ void CSIImpl::instrumentFunction(Function &F) {
Syncs.push_back(SI);
if (isSyncUnwind(SI->getSuccessor(0)->getFirstNonPHIOrDbgOrLifetime(),
/*SyncRegion=*/nullptr, /*CheckForInvoke=*/true)) {
dbgs() << "Sync " << *SI << "has unwind\n" << F;
SyncsWithUnwinds.insert(SI);
BBsToIgnore.insert(SI->getSuccessor(0));
}
Expand Down

0 comments on commit 602a75a

Please sign in to comment.