#include <mim/be/emitter.h>
Public Attributes | |
| fe::Tab | tab = fe::Tab::spaces() |
Protected Member Functions | |
| Emitter (World &world, std::string name, std::ostream &ostream, bool schedule=false) | |
| virtual bool | direct_style () |
| 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 Nest &nest) override |
| Protected Member Functions inherited from mim::ClosedMutPhase< Lam > | |
| void | start () override |
| Actual entry. | |
| virtual void | visit (Lam *)=0 |
| Lam * | root () const |
Protected Attributes | |
| Lam * | curr_lam_ = nullptr |
| std::ostream & | ostream_ |
| Scheduler | scheduler_ |
| DefMap< Value > | locals_ |
| DefMap< Value > | globals_ |
| DefMap< Type > | types_ |
| LamMap< BB > | lam2bb_ |
| Protected Attributes inherited from mim::Phase | |
| std::string | name_ |
Additional Inherited Members | |
| Public Member Functions inherited from mim::NestPhase< Lam > | |
| NestPhase (World &world, std::string name, bool elide_empty, bool schedule=false) | |
| const Nest & | nest () const |
| Public Member Functions inherited from mim::ClosedMutPhase< Lam > | |
| ClosedMutPhase (World &world, std::string name, bool elide_empty, bool schedule=false) | |
| bool | elide_empty () const |
| bool | schedule () const |
| Public Member Functions inherited from mim::Phase | |
| Phase (World &world, std::string name) | |
| Phase (World &world, flags_t annex) | |
| virtual | ~Phase ()=default |
| virtual std::unique_ptr< Phase > | recreate () |
| Creates a new instance; needed by a fixed-point PhaseMan. | |
| virtual void | apply (const App *) |
| Invoked if your Phase has additional args. | |
| virtual void | apply (Phase &) |
| Dito, but invoked by Phase::recreate. | |
| virtual bool | redirects () const |
| If true, Phase::create uses take_resolved(). | |
| virtual std::unique_ptr< Phase > | take_resolved () |
| The Phase to use instead; nullptr means elide. | |
| World & | world () |
| Driver & | driver () |
| Log & | log () const |
| std::string_view | name () const |
| flags_t | annex () const |
| const Vector< std::string > & | args () |
| Command-line arguments passed to this Phase's plugin via -X <plugin>:<arg>. | |
| bool | todo () const |
| void | invalidate (bool todo=true) |
| Signals that another round of fixed-point iteration is required, either as part of. | |
| virtual void | run () |
| Entry point and generates some debug output; invokes Phase::start. | |
| void | profile_count (std::string_view key, uint64_t n=1) |
Adds n to the custom Profiler counter key of the current run; no-op unless profiling is enabled. | |
| Static Public Member Functions inherited from mim::Phase | |
| static std::unique_ptr< Phase > | create (const Flags2Phases &phases, const Def *def) |
| template<class A, class P> | |
| static void | hook (Flags2Phases &phases) |
| template<class P, class... Args> | |
| static void | run (Args &&... args) |
| Runs a single Phase. | |
|
inlineprotected |
|
inlineprotectedvirtual |
Reimplemented in mim::sexpr::Emitter.
Definition at line 31 of file emitter.h.
Referenced by mim::Emitter< std::string, std::string, BB, Emitter >::visit().
|
inlineprotected |
|
inlineprotected |
As above but returning !child().is_valid(value) is permitted.
Definition at line 45 of file emitter.h.
Referenced by mim::Emitter< std::string, std::string, BB, Emitter >::emit().
|
inlineprotected |
|
inlineoverrideprotectedvirtual |
Implements mim::NestPhase< Lam >.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| fe::Tab mim::Emitter< Value, Type, BB, Child >::tab = fe::Tab::spaces() |
|
protected |