[llvm-branch-commits] [llvm] [HLSL][RootSignature] Implement `ResourceRange` as an `IntervalMap` (PR #140957)
Justin Bogner via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 29 09:28:01 PDT 2025
================
@@ -198,6 +199,61 @@ class MetadataBuilder {
SmallVector<Metadata *> GeneratedMetadata;
};
+// RangeInfo holds the information to correctly construct a ResourceRange
+// and retains this information to be used for displaying a better diagnostic
+struct RangeInfo {
+ const static uint32_t Unbounded = static_cast<uint32_t>(-1);
+
+ uint32_t LowerBound;
+ uint32_t UpperBound;
+};
+
+class ResourceRange {
+public:
+ using IMap = llvm::IntervalMap<uint32_t, const RangeInfo *, 16,
+ llvm::IntervalMapInfo<uint32_t>>;
----------------
bogner wrote:
We're not entirely consistent about this, but we often use the `FooT` naming convention for type aliases. I think it would be good to do that here (either `MapT` or `IntervalMapT` I think - the "I" isn't the most obvious/useful abbreviation in this case).
https://github.com/llvm/llvm-project/pull/140957
More information about the llvm-branch-commits
mailing list