[llvm] [HLSL] Analyze update counter usage (PR #130356)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 10 11:50:46 PDT 2025
================
@@ -407,6 +411,77 @@ class DXILResourceTypeMap {
}
};
+enum ResourceCounterDirection {
+ Increment,
+ Decrement,
+ Unknown,
+};
+
+class DXILResourceCounterDirectionMap {
+ std::vector<std::pair<dxil::ResourceBindingInfo, ResourceCounterDirection>>
+ CounterDirections;
+
+public:
+ bool invalidate(Module &M, const PreservedAnalyses &PA,
+ ModuleAnalysisManager::Invalidator &Inv);
+
+ void populate(Module &M, ModuleAnalysisManager &AM);
+
+ ResourceCounterDirection
----------------
inbelic wrote:
I believe this is only explicitly used in testing, or does it get used implicitly by some of the std algorithms? Maybe we can simplify and remove this and use a similar `std` algorithm in testing?
Just thinking out loud
https://github.com/llvm/llvm-project/pull/130356
More information about the llvm-commits
mailing list