[llvm] [LoopUnroll] Remove redundant llvm.dbg instructions after blocks (PR #89069)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 00:32:23 PDT 2024
================
@@ -333,6 +333,9 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
// Finally, erase the old block and update dominator info.
DeleteDeadBlock(BB, DTU);
+ // Remove redundant "llvm.dbg" instrunctions after blocks merged.
+ RemoveRedundantDbgInstrs(PredBB);
----------------
coderchenlin wrote:
@fhahn, I added a condition to control it (only execute with the "-g" flag ). Could you please review it again?
https://github.com/llvm/llvm-project/pull/89069
More information about the llvm-commits
mailing list