[llvm] 7acad68 - [AMDGPU][CodeGen] SILowerWWMCopies: Declare used analyses (#123710)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 02:03:23 PST 2025


Author: Akshat Oke
Date: 2025-01-21T15:33:20+05:30
New Revision: 7acad6893b9b3b43e5e4a8e56404b1b19c07c79f

URL: https://github.com/llvm/llvm-project/commit/7acad6893b9b3b43e5e4a8e56404b1b19c07c79f
DIFF: https://github.com/llvm/llvm-project/commit/7acad6893b9b3b43e5e4a8e56404b1b19c07c79f.diff

LOG: [AMDGPU][CodeGen] SILowerWWMCopies: Declare used analyses (#123710)

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)

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp

Removed: 
    


################################################################################
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);
   }


        


More information about the llvm-commits mailing list