[llvm] [DXIL][Analysis] Uniquify duplicate resources in DXILResourceAnalysis (PR #105602)

Xiang Li via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 05:18:47 PDT 2024


================
@@ -216,15 +240,88 @@ class ResourceInfo {
 
   MDTuple *getAsMetadata(LLVMContext &Ctx) const;
 
-  ResourceBinding getBinding() const { return Binding; }
   std::pair<uint32_t, uint32_t> getAnnotateProps() const;
 
   void print(raw_ostream &OS) const;
 };
 
 } // namespace dxil
 
-using DXILResourceMap = MapVector<CallInst *, dxil::ResourceInfo>;
+class DXILResourceMap {
+  SmallVector<dxil::ResourceInfo> Resources;
+  DenseMap<CallInst *, unsigned> CallMap;
----------------
python3kgae wrote:

What is the function called by these CallInst here and who is the user of these CallInst when use ResourceAnalysis?

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


More information about the llvm-commits mailing list