[llvm] [HLSL] Analyze update counter usage (PR #130356)

Ashley Coleman via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 10 09:31:04 PDT 2025


================
@@ -407,6 +411,77 @@ class DXILResourceTypeMap {
   }
 };
 
+enum ResourceCounterDirection {
+  Increment,
+  Decrement,
+  Unknown,
+};
+
+class DXILResourceCounterDirectionMap {
+  std::vector<std::pair<dxil::ResourceBindingInfo, ResourceCounterDirection>>
----------------
V-FEXrt wrote:

Since we can do all the processing ahead of time it's better to use a sorted vector with binary-search key lookup.

This also completely side steps the issue of designing a good hash function

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


More information about the llvm-commits mailing list