|
MimIR 0.1
MimIR is my Intermediate Representation
|
Unlike a Pass, a Phase performs one self-contained task and does not interleave 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) | |
Fixed-Point Handling | |
| bool | todo () const |
| void | invalidate (bool todo=true) |
| Signals that another round of fixed-point iteration is required, either as part of. | |
| Public Member Functions inherited from mim::Stage | |
| 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. | |
Friends | |
| class | Analysis |
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) |
| Protected Attributes inherited from mim::Stage | |
| std::string | name_ |
Unlike a Pass, a Phase performs one self-contained task and does not interleave with other phases.
Phases are intended to run in a classical sequence, one after another.
|
inline |
Definition at line 31 of file phase.h.
References mim::Stage::name(), mim::Stage::Stage(), and mim::Stage::world().
Referenced by mim::Analysis::Analysis(), mim::Analysis::Analysis(), mim::PhaseMan::apply(), mim::PhaseMan::apply(), mim::plug::clos::ClosConv::ClosConv(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::plug::direct::CPS2DSPhase::CPS2DSPhase(), 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 33 of file phase.h.
References mim::Stage::annex(), mim::Stage::Stage(), and mim::Stage::world().
|
inline |
Signals that another round of fixed-point iteration is required, either as part of.
Calling invalidate(todo) bitwise-ORs todo into the internal todo_ flag.
Definition at line 48 of file phase.h.
References todo().
Referenced by mim::BetaRedPhase::rewrite_imm_App(), mim::SymExprOpt::rewrite_imm_App(), and mim::PhaseMan::start().
|
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(), mim::sexpr::emit(), mim::sexpr::emit_slotted(), main(), and mim::PassMan::run().
|
inlinestatic |
|
pure virtual |
Actual entry.
Implemented in mim::Analysis, 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::plug::direct::CPS2DSPhase, mim::ReplManPhase, mim::RWPhase, and mim::sexpr::Emitter.
Referenced by run(), mim::ll::Emitter::start(), and mim::sexpr::Emitter::start().
|
inline |
Definition at line 40 of file phase.h.
Referenced by invalidate(), mim::ReplManPhase::rewrite(), mim::PhaseMan::start(), and mim::RWPhase::start().
|
friend |
Definition at line 67 of file phase.h.
References Analysis.
Referenced by Analysis, mim::RWPhase::analysis(), mim::RWPhase::analysis(), mim::RWPhase::RWPhase(), and mim::RWPhase::RWPhase().