16 Ref map(
Ref old_def,
Ref new_def) {
return old2new_[old_def] = new_def; }
36 if (
auto v = var->isa<
Var>()) {
Vars local_vars() const
Vars reachable by following immutable extended_ops().
Muts local_muts() const
Mutables reachable by following immutable extended_ops().
Vars free_vars() const
Compute a global solution, i.e., by transitively following mutables as well.
const Var * has_var()
Only returns not nullptr, if Var of this mutable has ever been created.
constexpr bool empty() const noexcept
bool intersects(PooledSet< T > other)
Is ?
Helper class to retrieve Infer::arg if present.
Recurseivly rewrites part of a program into the provided World.
virtual Ref rewrite_imm(Ref)
Ref map(Ref old_def, Ref new_def)
Map old_def to new_def and returns new_def;.
virtual Ref rewrite_mut(Def *)
VarRewriter(Ref var, Ref arg)
Ref rewrite_imm(Ref imm) override
Ref rewrite_mut(Def *mut) override
The World represents the whole program and manages creation of MimIR nodes (Defs).
DefMap< const Def * > Def2Def