[llvm] [AMDGPU][CodeGen] SILowerWWMCopies: Declare used analyses (PR #123710)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 00:43:15 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Akshat Oke (optimisan)
<details>
<summary>Changes</summary>
This prevents legacy PM from mistakenly removing these analyses if `SILowerWWMCopies` is the last user of them. (it removes dead analyses after its last use)
---
Full diff: https://github.com/llvm/llvm-project/pull/123710.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp (+3)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp b/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
index c663820311b8ce..d80a5f958273a9 100644
--- a/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
@@ -43,6 +43,9 @@ class SILowerWWMCopies : public MachineFunctionPass {
StringRef getPassName() const override { return "SI Lower WWM Copies"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.addUsedIfAvailable<LiveIntervalsWrapperPass>();
+ AU.addUsedIfAvailable<SlotIndexesWrapperPass>();
+ AU.addUsedIfAvailable<VirtRegMapWrapperLegacy>();
AU.setPreservesAll();
MachineFunctionPass::getAnalysisUsage(AU);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/123710
More information about the llvm-commits
mailing list