NOSSLETTER.techLIVE
back to archive

[IR][TableGen] Add RangeSet TableGen intrinsic property

Language: C+++338 -5feature
The Issue & Context

The LLVM TableGen system previously supported a single half-open range attribute via the `Range<idx, lo, hi>` intrinsic, limiting the ability to represent multiple discrete intervals within a single property.

Root Cause Analysis

The existing `Range` intrinsic was insufficient for modeling multiple closed, non-overlapping intervals as it only supported one half-open range, restricting expressiveness in TableGen definitions.

Solution Strategy & Architectural Pattern

Introduced a new `RangeSet` TableGen intrinsic property that allows specifying multiple closed, ordered, and non-overlapping intervals using the syntax `RangeSet<idx, [[lo0, hi0], [lo1, hi1], ...]>`, while preserving the existing `Range` semantics and attribute emission.

Key Takeaway for Contributors

Adding `RangeSet` enhances TableGen's expressiveness for interval representation without breaking existing code, enabling more precise and complex range specifications in LLVM's IR descriptions.

View full digest for 2026-08-28