Thorin 1.9.0
The Higher ORder INtermediate representation
|
#include <thorin/be/emitter.h>
Public Attributes | |
Tab | tab |
Protected Member Functions | |
Emitter (World &world, std::string_view name, std::ostream &ostream) | |
std::ostream & | ostream () const |
Value | emit (const Def *def) |
Recursively emits code. | |
Value | emit_unsafe (const Def *def) |
As above but returning !child().is_valid(value) is permitted. | |
void | visit (const Scope &scope) override |
Protected Member Functions inherited from thorin::ScopePhase | |
const Scope & | scope () const |
Protected Attributes | |
std::ostream & | ostream_ |
Scheduler | scheduler_ |
DefMap< Value > | locals_ |
DefMap< Value > | globals_ |
DefMap< Type > | types_ |
LamMap< BB > | lam2bb_ |
Lam * | entry_ = nullptr |
Protected Attributes inherited from thorin::Phase | |
World & | world_ |
std::string | name_ |
bool | dirty_ |
Additional Inherited Members | |
Public Member Functions inherited from thorin::ScopePhase | |
ScopePhase (World &world, std::string_view name, bool elide_empty) | |
void | start () override |
Actual entry. | |
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. | |
Static Public Member Functions inherited from thorin::Phase | |
template<class P , class... Args> | |
static void | run (Args &&... args) |
Runs a single Phase. | |
|
inlineprotected |
|
inlineprotected |
Recursively emits code.
mem
-typed defs
return sth that is !child().is_valid(value)
. This variant asserts in this case.
Definition at line 35 of file emitter.h.
References thorin::Emitter< Value, Type, BB, Child >::emit_unsafe().
|
inlineprotected |
As above but returning !child().is_valid(value)
is permitted.
Definition at line 42 of file emitter.h.
References thorin::Emitter< Value, Type, BB, Child >::globals_, and thorin::Emitter< Value, Type, BB, Child >::locals_.
Referenced by thorin::Emitter< Value, Type, BB, Child >::emit().
|
inlineprotected |
Definition at line 30 of file emitter.h.
References thorin::Emitter< Value, Type, BB, Child >::ostream_.
|
inlineoverrideprotectedvirtual |
Implements thorin::ScopePhase.
Definition at line 50 of file emitter.h.
References thorin::Def::as_mut(), thorin::Scope::entry(), thorin::Emitter< Value, Type, BB, Child >::entry_, thorin::Scope::exit(), thorin::Def::is_set(), thorin::Lam::isa_basicblock(), thorin::Def::isa_mut(), thorin::Emitter< Value, Type, BB, Child >::lam2bb_, thorin::Emitter< Value, Type, BB, Child >::locals_, thorin::Lam::ret_var(), thorin::Scheduler::schedule(), thorin::Emitter< Value, Type, BB, Child >::scheduler_, and thorin::ScopePhase::scope().
|
protected |
Definition at line 91 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 88 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::emit_unsafe().
|
protected |
Definition at line 90 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 87 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::emit_unsafe(), and thorin::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 85 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::ostream().
|
protected |
Definition at line 86 of file emitter.h.
Referenced by thorin::Emitter< Value, Type, BB, Child >::visit().
Tab thorin::Emitter< Value, Type, BB, Child >::tab |
|
protected |