31template<
bool Up>
class TBound :
public Bound,
public Setters<TBound<Up>> {
49class Merge :
public Def,
public Setters<Merge> {
65class Inj :
public Def,
public Setters<Inj> {
75 const Def*
value()
const {
return op(0); }
87class Split :
public Def,
public Setters<Split> {
97 const Def*
value()
const {
return op(0); }
109class Match :
public Def,
public Setters<Match> {
121 template<
size_t N = std::dynamic_extent>
constexpr auto arms() const noexcept {
return ops().subspan<1, N>(); }
122 const Def*
arm(
size_t i)
const {
return arms()[i]; }
140template<
bool Up>
class TExt :
public Ext,
public Setters<TExt<Up>> {
167class Uniq :
public Def,
public Setters<Uniq> {
169 Uniq(
const Def*
type,
const Def* inner_type)
170 : Def(
Node,
type, {inner_type}, 0) {}
constexpr size_t reduction_offset() const noexcept override
First Def::op that needs to be dealt with during reduction; e.g.
Bound(Node node, const Def *type, Defs ops)
size_t find(const Def *type) const
const Def * get(const Def *type) const
constexpr Node node() const noexcept
Def * set(size_t i, const Def *)
Successively set from left to right.
constexpr auto ops() const noexcept
const Def * op(size_t i) const noexcept
const Def * type() const noexcept
Yields the "raw" type of this Def (maybe nullptr).
Ext(Node node, const Def *type)
static constexpr auto Node
const Def * value() const
const Def * rebuild_(World &, const Def *, Defs) const override
const Def * value() const
static constexpr auto Node
const Def * arm(size_t i) const
const Def * rebuild_(World &, const Def *, Defs) const override
constexpr auto arms() const noexcept
const Def * rebuild_(World &, const Def *, Defs) const override
static constexpr auto Node
CRTP-based Mixin to declare setters for Def::loc & Def::name using a covariant return type.
const TBound< Up > * set(Loc l) const
static constexpr auto Node
const Def * value() const
const Def * rebuild_(World &, const Def *, Defs) const override
Specific Bound depending on Up.
const Def * rebuild_(World &, const Def *, Defs) const override
static constexpr auto Node
Extremum. Either Top (Up) or Bottom.
static constexpr auto Node
const Def * rebuild_(World &, const Def *, Defs) const override
const Def * inhabitant() const
static constexpr auto Node
const Def * rebuild_(World &, const Def *, Defs) const override
The World represents the whole program and manages creation of MimIR nodes (Defs).
TBound< true > Join
AKA union.
TBound< false > Meet
AKA intersection.