59 template<
bool infer = true>
static bool alpha(
Ref d1,
Ref d2) {
return Check(d1->
world()).alpha_<infer>(d1, d2); }
66 static Ref is_uniform(
Defs defs);
69#ifdef THORIN_ENABLE_CHECKS
70 template<
bool>
bool fail();
72 template<
bool>
bool fail() {
return false; }
75 template<
bool infer>
bool alpha_(Ref d1, Ref d2);
76 template<
bool infer>
bool alpha_internal(Ref, Ref);
77 bool assignable_(Ref
type, Ref value);
80 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?
Def * reset(size_t i, const Def *def)
Successively reset from left to right.
bool has_dep(Dep d) const
const T * isa_imm() const
const Def * op(size_t i) const
Def * unset()
Unsets all Def::ops; works even, if not set at all or partially.
const Def * type() const
Yields the raw type of this Def, i.e. maybe nullptr.
Def * set(size_t i, const Def *def)
Successively set from left to right.
This node is a hole in the IR that is inferred by its context later on.
static const Def * find(const Def *)
Union-Find to unify Infer nodes.
Infer * reset(const Def *op)
Infer * set(const Def *op)
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)
Helper class to retrieve Infer::arg if present.
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 st...
The World represents the whole program and manages creation of Thorin nodes (Defs).
#define THORIN_DEF_MIXIN(T)
PooledSet< const Var * > Vars