MimIR 0.1
MimIR is my Intermediate Representation
|
#include <mim/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 mim::ScopePhase | |
const Scope & | scope () const |
Protected Member Functions inherited from mim::Phase |
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 mim::Phase | |
World & | world_ |
std::string | name_ |
bool | dirty_ |
Additional Inherited Members | |
Public Member Functions inherited from mim::ScopePhase | |
ScopePhase (World &world, std::string_view name, bool elide_empty) | |
void | start () override |
Actual entry. | |
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. | |
Static Public Member Functions inherited from mim::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 34 of file emitter.h.
References mim::Emitter< Value, Type, BB, Child >::emit_unsafe().
|
inlineprotected |
As above but returning !child().is_valid(value)
is permitted.
Definition at line 41 of file emitter.h.
References mim::Emitter< Value, Type, BB, Child >::globals_, and mim::Emitter< Value, Type, BB, Child >::locals_.
Referenced by mim::Emitter< Value, Type, BB, Child >::emit().
|
inlineprotected |
Definition at line 29 of file emitter.h.
References mim::Emitter< Value, Type, BB, Child >::ostream_.
|
inlineoverrideprotectedvirtual |
Implements mim::ScopePhase.
Definition at line 49 of file emitter.h.
References mim::Def::as_mut(), mim::Scope::entry(), mim::Emitter< Value, Type, BB, Child >::entry_, mim::Scope::exit(), mim::Def::is_set(), mim::Lam::isa_basicblock(), mim::Def::isa_mut(), mim::Emitter< Value, Type, BB, Child >::lam2bb_, mim::Emitter< Value, Type, BB, Child >::locals_, mim::Lam::ret_var(), mim::Scheduler::schedule(), mim::Emitter< Value, Type, BB, Child >::scheduler_, and mim::ScopePhase::scope().
|
protected |
Definition at line 90 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 87 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::emit_unsafe().
|
protected |
Definition at line 89 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 86 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::emit_unsafe(), and mim::Emitter< Value, Type, BB, Child >::visit().
|
protected |
Definition at line 84 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::ostream().
|
protected |
Definition at line 85 of file emitter.h.
Referenced by mim::Emitter< Value, Type, BB, Child >::visit().
Tab mim::Emitter< Value, Type, BB, Child >::tab |
|
protected |