A (possibly paramterized) Array.
const Def * immutabilize() override
Tries to make an immutable from a mutable.
static constexpr auto Node
Ref rebuild_(World &, Ref, Defs) const override
Arr * set_shape(Ref shape)
Arr * stub_(World &, Ref) override
Ref reduce(Ref arg) const
Ref op(size_t i) const noexcept
World & world() const noexcept
constexpr auto ops() const noexcept
Def * set(size_t i, Ref)
Successively set from left to right.
DefVec reduce(Ref arg) const
Rewrites Def::ops by substituting this mutable's Var with arg.
Ref type() const noexcept
Yields the raw type of this Def, i.e. maybe nullptr.
Def * unset()
Unsets all Def::ops; works even, if not set at all or partially.
Creates a new Tuple / Pack by inserting Insert::value at position Insert::index into Insert::tuple.
static constexpr auto Node
Ref rebuild_(World &, Ref, Defs) const override
A (possibly paramterized) Tuple.
Pack * stub_(World &, Ref) override
Ref rebuild_(World &, Ref, Defs) const override
Ref reduce(Ref arg) const
const Def * immutabilize() override
Tries to make an immutable from a mutable.
static constexpr auto Node
Helper class to retrieve Infer::arg if present.
CRTP-based Mixin to declare setters for Def::loc & Def::name using a covariant return type.
const Def * immutabilize() override
Tries to make an immutable from a mutable.
static Ref infer(World &, Defs)
Ref rebuild_(World &, Ref, Defs) const override
Sigma * stub_(World &, Ref) override
static constexpr auto Node
Sigma * set(size_t i, const Def *def)
This is a thin wrapper for std::span<T, N> with the following additional features:
Data constructor for a Sigma.
Ref rebuild_(World &, Ref, Defs) const override
static constexpr auto Node
The World represents the whole program and manages creation of MimIR nodes (Defs).
std::string tuple2str(Ref)
Ref merge_tuple(Ref def, Defs defs)
Ref unflatten(Ref def, Ref type)
Applies the reverse transformation on a Pack / Tuple, given the original type.
Ref flatten(Ref def)
Flattens a sigma/array/pack/tuple.
Ref merge_sigma(Ref def, Defs defs)
Ref tuple_of_types(Ref t)