Skip to content

Commit 5bd126f

Browse files
coderchenlinchenlin (CG)
authored andcommitted
[LoopUnroll] Remove redundant llvm.dbg instructions after blocks
merged. (#89073)
1 parent d8d2dea commit 5bd126f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Transforms/Utils/BasicBlockUtils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
333333
// Finally, erase the old block and update dominator info.
334334
DeleteDeadBlock(BB, DTU);
335335

336+
// Remove redundant "llvm.dbg" instrunctions after blocks merged.
337+
if (PredBB->getParent()->getSubprogram())
338+
RemoveRedundantDbgInstrs(PredBB);
339+
336340
return true;
337341
}
338342

0 commit comments

Comments
 (0)