[llvm] [DirectX] Add missing Analysis usage to DXILResourceMDWrapper (PR #104244)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 14:28:19 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-directx

Author: Justin Bogner (bogner)

<details>
<summary>Changes</summary>

This analysis can't be used with other analyses if this isn't set.


---
Full diff: https://github.com/llvm/llvm-project/pull/104244.diff


1 Files Affected:

- (modified) llvm/lib/Target/DirectX/DXILResourceAnalysis.h (+4) 


``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILResourceAnalysis.h b/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
index 3a2b8a9fd39d59..26d9237d51b49c 100644
--- a/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
+++ b/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
@@ -57,6 +57,10 @@ class DXILResourceMDWrapper : public ModulePass {
   /// Calculate the DXILResource for the module.
   bool runOnModule(Module &M) override;
 
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
+    AU.setPreservesAll();
+  }
+
   void print(raw_ostream &O, const Module *M = nullptr) const override;
 };
 } // namespace llvm

``````````

</details>


https://github.com/llvm/llvm-project/pull/104244


More information about the llvm-commits mailing list