MimIR 0.1
MimIR is my Intermediate Representation
|
As opposed to a Pass, a Phase does one thing at a time and does not mix with other Phases. More...
#include <mim/phase.h>
Public Member Functions | |
Construction & Destruction | |
Phase (World &world, std::string name) | |
Phase (World &world, flags_t annex) | |
Getters | |
bool | todo () const |
![]() | |
World & | world () |
Driver & | driver () |
Log & | log () const |
std::string_view | name () const |
flags_t | annex () const |
Stage (World &world, std::string name) | |
Stage (World &world, flags_t annex) | |
virtual | ~Stage ()=default |
virtual std::unique_ptr< Stage > | recreate () |
Creates a new instance; needed by a fixed-point PhaseMan. | |
virtual void | apply (const App *) |
Invoked if your Stage has additional args. | |
virtual void | apply (Stage &) |
Dito, but invoked by Stage::recreate. | |
Protected Attributes | |
bool | todo_ = false |
Set to true to indicate that you want to rerun all Phasees in current your fixed-point PhaseMan. | |
![]() | |
std::string | name_ |
run | |
virtual void | run () |
Entry point and generates some debug output; invokes Phase::start. | |
virtual void | start ()=0 |
Actual entry. | |
template<class P, class... Args> | |
static void | run (Args &&... args) |
Runs a single Phase. | |
Additional Inherited Members | |
static auto | create (const Flags2Stages &stages, const Def *def) |
template<class A, class P> | |
static void | hook (Flags2Stages &stages) |
As opposed to a Pass, a Phase does one thing at a time and does not mix with other Phases.
They are supposed to classically run one after another.
|
inline |
Definition at line 30 of file phase.h.
References mim::Stage::name(), mim::Stage::Stage(), and mim::Stage::world().
Referenced by mim::PhaseMan::apply(), mim::plug::clos::ClosConv::ClosConv(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::plug::clos::LowerTypedClos::LowerTypedClos(), mim::PassManPhase::PassManPhase(), mim::PassManPhase::PassManPhase(), mim::PhaseMan::PhaseMan(), mim::RWPhase::RWPhase(), mim::RWPhase::RWPhase(), and mim::PhaseMan::start().
Definition at line 32 of file phase.h.
References mim::Stage::annex(), mim::Stage::Stage(), and mim::Stage::world().
|
virtual |
Entry point and generates some debug output; invokes Phase::start.
Definition at line 13 of file phase.cpp.
References mim::Stage::name(), start(), mim::World::verify(), and mim::Stage::world().
Referenced by mim::ll::emit(), main(), and mim::PassMan::run().
|
inlinestatic |
|
pure virtual |
Actual entry.
Implemented in mim::ClosedMutPhase< M >, mim::ClosedMutPhase< Def >, mim::ClosedMutPhase< Lam >, mim::ll::Emitter, mim::PassManPhase, mim::PhaseMan, mim::plug::clos::ClosConv, mim::plug::clos::LowerTypedClos, mim::ReplManPhase, and mim::RWPhase.
Referenced by run(), and mim::ll::Emitter::start().
|
inline |
Definition at line 39 of file phase.h.
References todo_.
Referenced by mim::ReplManPhase::rewrite(), mim::PhaseMan::start(), and mim::RWPhase::start().
|
protected |
Set to true
to indicate that you want to rerun all Phasees in current your fixed-point PhaseMan.
Definition at line 57 of file phase.h.
Referenced by mim::BetaRedPhase::rewrite_imm_App(), mim::PhaseMan::start(), and todo().