Thorin 1.9.0
The Higher ORder INtermediate representation
|
Transitively visits all reachable Scopes in World that do not have free variables. More...
#include <thorin/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 thorin::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 |
Additional Inherited Members | |
Static Public Member Functions inherited from thorin::Phase | |
template<class P , class... Args> | |
static void | run (Args &&... args) |
Runs a single Phase. | |
Protected Attributes inherited from thorin::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 160 of file phase.h.
Referenced by thorin::ll::Emitter::finalize(), thorin::ll::Emitter::prepare(), start(), thorin::plug::mem::AddMem::visit(), and thorin::Emitter< Value, Type, BB, Child >::visit().
|
overridevirtual |
Actual entry.
Implements thorin::Phase.
Definition at line 45 of file phase.cpp.
References thorin::unique_queue< Set >::empty(), thorin::World::externals(), thorin::Scope::free_muts(), thorin::Phase::name(), thorin::unique_queue< Set >::pop(), thorin::unique_queue< Set >::push(), scope(), visit(), and thorin::Phase::world().
|
pure virtual |
Implemented in thorin::plug::mem::AddMem, thorin::Emitter< Value, Type, BB, Child >, and thorin::Emitter< std::string, std::string, BB, Emitter >.
Referenced by start().