MimIR 0.1
MimIR is my Intermediate Representation
|
Transitively visits all reachable Scopes in World that do not have free variables. More...
#include <mim/phase/phase.h>
Public Member Functions | |
ScopePhase (World &world, std::string_view name, bool elide_empty) | |
void | start () override |
Actual entry. | |
virtual void | visit (const Scope &)=0 |
Public Member Functions inherited from mim::Phase | |
Phase (World &world, std::string_view name, bool dirty) | |
virtual | ~Phase ()=default |
World & | world () |
std::string_view | name () const |
bool | is_dirty () const |
virtual void | run () |
Entry point and generates some debug output; invokes Phase::start. | |
Protected Member Functions | |
const Scope & | scope () const |
Protected Member Functions inherited from mim::Phase |
Additional Inherited Members | |
Static Public Member Functions inherited from mim::Phase | |
template<class P , class... Args> | |
static void | run (Args &&... args) |
Runs a single Phase. | |
Protected Attributes inherited from mim::Phase | |
World & | world_ |
std::string | name_ |
bool | dirty_ |
Transitively visits all reachable Scopes in World that do not have free variables.
We call these Scopes top-level Scopes. Select with elide_empty
whether you want to visit trivial Scopes of muts without body. Assumes that you don't change anything - hence dirty
flag is set to false
.
|
inline |
|
inlineprotected |
Definition at line 159 of file phase.h.
Referenced by mim::ll::Emitter::finalize(), mim::ll::Emitter::prepare(), start(), mim::Emitter< Value, Type, BB, Child >::visit(), and mim::plug::mem::AddMem::visit().
|
overridevirtual |
Actual entry.
Implements mim::Phase.
Definition at line 43 of file phase.cpp.
References mim::unique_queue< Set >::empty(), mim::Scope::free_muts(), mim::Phase::name(), mim::unique_queue< Set >::pop(), mim::unique_queue< Set >::push(), scope(), visit(), and mim::Phase::world().
|
pure virtual |
Implemented in mim::Emitter< Value, Type, BB, Child >, mim::Emitter< std::string, std::string, BB, Emitter >, and mim::plug::mem::AddMem.
Referenced by start().