[llvm] [LoopUnroll] Remove redundant llvm.dbg instructions after blocks (PR #89069)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 06:16:11 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: CL (coderchenlin)
<details>
<summary>Changes</summary>
merged.
---
Full diff: https://github.com/llvm/llvm-project/pull/89069.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Utils/BasicBlockUtils.cpp (+3)
``````````diff
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 5aa59acfa6df99..ca9d7649ea9826 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -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);
+
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/89069
More information about the llvm-commits
mailing list