[llvm-branch-commits] [DXIL][Analysis] Boilerplate for DXILResourceAnalysis pass (PR #100700)

Xiang Li via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 26 07:39:21 PDT 2024


================
@@ -212,6 +216,53 @@ class ResourceInfo {
 };
 
 } // namespace dxil
+
+using DXILResourceMap = MapVector<CallInst *, dxil::ResourceInfo>;
+
+class DXILResourceAnalysis : public AnalysisInfoMixin<DXILResourceAnalysis> {
+  friend AnalysisInfoMixin<DXILResourceAnalysis>;
+
+  static AnalysisKey Key;
+
+public:
+  using Result = DXILResourceMap;
+
+  /// Gather resource info for the module \c M.
+  DXILResourceMap run(Module &M, ModuleAnalysisManager &AM);
----------------
python3kgae wrote:

DXILResourceMap is result of run.
To use DXILResourceMap more than once in different passes, do I need to call DXILResourceAnalysis::run more than once?

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


More information about the llvm-branch-commits mailing list