[llvm] [DirectX] Add support for heap resources to `DXILResourceMap` (PR #216454)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 12:55:19 PDT 2026


================
@@ -839,6 +847,12 @@ void DXILResourceMap::populateResourceInfos(Module &M,
                                             DXILResourceTypeMap &DRTM) {
   SmallVector<std::tuple<CallInst *, ResourceInfo, ResourceTypeInfo>> CIToInfos;
 
+  // We need to assign a unique ID to each resource that is created
+  // from a heap. The ID must be unique for each unique Index value so
+  // we can differentiate between resources instances of the same type.
+  DenseMap<Value *, uint32_t> IndexToHeapResID;
----------------
bogner wrote:

What's a reasonable number of resource ids here? Is SmallDenseMap worthwhile?

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


More information about the llvm-commits mailing list