MimIR 0.1
MimIR is my Intermediate Representation
|
A Scope
represents a region of Defs
that are live from the view of an entry's
Var
.
More...
#include <mim/analyses/scope.h>
Public Member Functions | |
Scope (const Scope &)=delete | |
Scope & | operator= (Scope)=delete |
Scope (Def *entry) | |
~Scope () | |
getters | |
World & | world () const |
Def * | entry () const |
Def * | exit () const |
Sym | sym () const |
Defs bound/free in this Scope | |
bool | bound (const Def *def) const |
const DefSet & | bound () const |
All Defs within this Scope . | |
const DefSet & | free_defs () const |
All non-const Defs directly referenced but not bound within this Scope . May also include Vars or muts. | |
const VarSet & | free_vars () const |
All Vars that occurr free in this Scope . Does not transitively contain any free Vars from muts . | |
const MutSet & | free_muts () const |
All muts that occurr free in this Scope . | |
simple CFA to construct a CFG | |
const CFA & | cfa () const |
const F_CFG & | f_cfg () const |
const B_CFG & | b_cfg () const |
Static Public Member Functions | |
static bool | is_free (Def *mut, const Def *def) |
Does mut's Var occurr free in def ? | |
A Scope
represents a region of Defs
that are live from the view of an entry's
Var
.
Transitively, all user's of the entry's
Var
are pooled into this Scope
(see defs()
). Both entry()
and exit()
are NOT part of the Scope
itself. The exit()
is just a virtual dummy to have a unique exit dual to entry()
.
|
delete |
const B_CFG & mim::Scope::b_cfg | ( | ) | const |
Definition at line 88 of file scope.cpp.
References mim::CFA::b_cfg(), and cfa().
|
inline |
|
inline |
const CFA & mim::Scope::cfa | ( | ) | const |
Definition at line 86 of file scope.cpp.
References mim::lazy_init().
|
inline |
Definition at line 31 of file scope.h.
Referenced by mim::CFA::CFA(), mim::ll::Emitter::prepare(), mim::Emitter< Value, Type, BB, Child >::visit(), and mim::plug::mem::AddMem::visit().
|
inline |
Definition at line 32 of file scope.h.
Referenced by mim::ll::Emitter::finalize(), and mim::Emitter< Value, Type, BB, Child >::visit().
const F_CFG & mim::Scope::f_cfg | ( | ) | const |
Definition at line 87 of file scope.cpp.
References cfa(), and mim::CFA::f_cfg().
Referenced by mim::Scheduler::schedule().
|
inline |
|
inline |
All muts that occurr free in this Scope
.
Definition at line 43 of file scope.h.
Referenced by mim::ScopePhase::start(), and mim::plug::mem::AddMem::visit().
|
inline |
Does mut's
Var occurr free in def
?
Definition at line 90 of file scope.cpp.
References bound(), mim::Def::num_ops(), and mim::Def::var().
|
inline |
Definition at line 33 of file scope.h.
References mim::Def::sym().
|
inline |
Definition at line 30 of file scope.h.
Referenced by mim::CFA::world().