[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 08:42:17 PDT 2025


================
@@ -136,6 +136,51 @@ struct OverlappingRanges {
 llvm::SmallVector<OverlappingRanges>
 findOverlappingRanges(llvm::SmallVector<RangeInfo> &Infos);
 
+class RootSignatureBindingValidation {
+private:
+  llvm::SmallVector<RangeInfo, 16> Bindings;
+  struct TypeRange {
+    uint32_t Start;
+    uint32_t End;
+  };
+  std::unordered_map<dxil::ResourceClass, TypeRange> Ranges;
----------------
bogner wrote:

This can be done with an insert-then-query approach, so the sorted vector is a reasonable suggestion. That said, this is the third implementation of pretty much the same algorithm for calculating binding ranges at this point. See my top level comment.

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


More information about the llvm-commits mailing list