65 template<
bool infer = true>
static bool alpha(
Ref d1,
Ref d2) {
return Check(d1->
world()).alpha_<infer>(d1, d2); }
75#ifdef MIM_ENABLE_CHECKS
76 template<
bool>
bool fail();
78 template<
bool>
bool fail() {
return false; }
81 template<
bool infer>
bool alpha_(Ref d1, Ref d2);
82 template<
bool infer>
bool alpha_internal(Ref, Ref);
83 bool assignable_(Ref type, Ref value);
86 using Vars = MutMap<Def*>;
static bool alpha(Ref d1, Ref d2)
Are d1 and d2 α-equivalent?
static bool assignable(Ref type, Ref value)
Can value be assigned to sth of type?
static Ref is_uniform(Defs defs)
Yields defs.front(), if all defs are Check::alpha-equivalent (infer = false) and nullptr otherwise.
Def * set(size_t i, const Def *def)
Successively set from left to right.
const Def * op(size_t i) const
bool has_dep(Dep d) const
Def * unset()
Unsets all Def::ops; works even, if not set at all or partially.
const T * isa_imm() const
Def * reset(size_t i, const Def *def)
Successively reset from left to right.
This node is a hole in the IR that is inferred by its context later on.
static bool eliminate(Vector< Ref * >)
Eliminate Infers that may have been resolved in the meantime by rebuilding.
Infer * stub_(World &, Ref) override
static bool should_eliminate(Ref def)
static const Def * find(const Def *)
Union-Find to unify Infer nodes.
static constexpr auto Node
Infer * reset(const Def *op)
Infer * set(const Def *op)
Ref rebuild_(World &, Ref, Defs) const override
Helper class to retrieve Infer::arg if present.
CRTP-based Mixin to declare setters for Def::loc & Def::name using a covariant return type.
This is a thin wrapper for std::span<T, N> with the following additional features:
This is a thin wrapper for absl::InlinedVector<T, N, / A> which in turn is a drop-in replacement for ...
The World represents the whole program and manages creation of MimIR nodes (Defs).
GIDMap< Def *, To > MutMap