================
@@ -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;
----------------
llvm-beanz wrote:

The LLVM Programmers manual explicitly states:
> We never use containers like unordered_map because they are generally very 
> expensive (each insertion requires a malloc).

(Source: 
https://llvm.org/docs/ProgrammersManual.html#other-map-like-container-options)

`llvm::DenseMap` is generally preferred. That said, since `dxil::ResourceClass` 
has a valid value range [0,3], maybe we should just declare a 4-element array...

https://github.com/llvm/llvm-project/pull/146785
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to