MimIR 0.1
MimIR is my Intermediate Representation
|
Common base for Phase and Pass. More...
#include <mim/pass.h>
Public Member Functions | |
Getters | |
World & | world () |
Driver & | driver () |
Log & | log () const |
std::string_view | name () const |
flags_t | annex () const |
Protected Attributes | |
std::string | name_ |
Construction & Destruction | |
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. | |
static auto | create (const Flags2Stages &stages, const Def *def) |
template<class A, class P> | |
static void | hook (Flags2Stages &stages) |
|
inline |
Definition at line 30 of file pass.h.
References name(), name_, and world().
Referenced by mim::plug::mem::pass::CopyProp::apply(), mim::plug::mem::pass::Reshape::apply(), apply(), mim::Pass::Pass(), mim::Pass::Pass(), mim::Phase::Phase(), mim::Phase::Phase(), and mim::Repl::Repl().
|
virtualdefault |
|
inline |
Definition at line 68 of file pass.h.
Referenced by mim::plug::mem::phase::AddMem::AddMem(), mim::PassManPhase::apply(), mim::ReplManPhase::apply(), mim::plug::autodiff::Eval::augment_pack(), mim::BetaRed::BetaRed(), mim::BetaRedPhase::BetaRedPhase(), mim::plug::clos::BranchClosElim::BranchClosElim(), mim::BranchNormalizePhase::BranchNormalizePhase(), mim::Cleanup::Cleanup(), mim::plug::clos::Clos2SJLJ::Clos2SJLJ(), mim::plug::clos::ClosConv::ClosConv(), mim::plug::clos::ClosConvPrep::ClosConvPrep(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::plug::mem::pass::CopyProp::CopyProp(), mim::plug::direct::CPS2DS::CPS2DS(), mim::plug::direct::DS2CPS::DS2CPS(), mim::EtaExp::EtaExp(), mim::EtaExpPhase::EtaExpPhase(), mim::EtaRed::EtaRed(), mim::EtaRedPhase::EtaRedPhase(), mim::plug::autodiff::Eval::Eval(), mim::FPPass< P, M >::FPPass(), mim::LamSpec::LamSpec(), mim::plug::affine::phase::LowerFor::LowerFor(), mim::plug::matrix::LowerMatrixHighLevelMapRed::LowerMatrixHighLevelMapRed(), mim::plug::matrix::LowerMatrixLowLevel::LowerMatrixLowLevel(), mim::plug::matrix::LowerMatrixMediumLevel::LowerMatrixMediumLevel(), mim::plug::regex::LowerRegex::LowerRegex(), mim::plug::clos::LowerTypedClos::LowerTypedClos(), mim::plug::clos::LowerTypedClosPrep::LowerTypedClosPrep(), mim::NestPhase< M >::NestPhase(), mim::Pass::Pass(), mim::PassMan::PassMan(), mim::PassManPhase::PassManPhase(), mim::Phase::Phase(), mim::PhaseMan::PhaseMan(), mim::PrefixCleanup::PrefixCleanup(), recreate(), mim::Repl::Repl(), mim::ReplMan::ReplMan(), mim::ReplManPhase::ReplManPhase(), mim::plug::mem::pass::Reshape::Reshape(), mim::RetWrap::RetWrap(), mim::plug::matrix::LowerMatrixMediumLevel::rewrite_(), mim::RWPass< P, M >::RWPass(), mim::RWPhase::RWPhase(), mim::Scalarize::Scalarize(), mim::plug::mem::pass::SSA::SSA(), Stage(), mim::plug::clos::LowerTypedClos::start(), and mim::TailRecElim::TailRecElim().
|
inlinevirtual |
Invoked if your Stage has additional args.
Reimplemented in mim::EtaRed, mim::PassMan, mim::PassManPhase, mim::PhaseMan, mim::plug::mem::pass::CopyProp, mim::plug::mem::pass::Reshape, mim::PrefixCleanup, mim::ReplMan, and mim::ReplManPhase.
Definition at line 37 of file pass.h.
Referenced by mim::optimize().
|
inlinevirtual |
Dito, but invoked by Stage::recreate.
Reimplemented in mim::EtaRed, mim::PassMan, mim::PassManPhase, mim::PhaseMan, mim::plug::mem::pass::CopyProp, mim::plug::mem::pass::Reshape, mim::PrefixCleanup, mim::ReplMan, and mim::ReplManPhase.
Definition at line 38 of file pass.h.
References Stage().
|
inlinestatic |
Definition at line 40 of file pass.h.
References mim::error(), mim::App::uncurry_callee(), mim::Def::world(), and world().
Referenced by mim::PassMan::apply(), mim::PassManPhase::apply(), mim::PhaseMan::apply(), mim::ReplMan::apply(), and mim::ReplManPhase::apply().
|
inline |
Definition at line 65 of file pass.h.
References mim::World::driver(), and world().
Referenced by mim::PassMan::apply(), mim::PassManPhase::apply(), mim::PhaseMan::apply(), mim::ReplMan::apply(), mim::ReplManPhase::apply(), and recreate().
|
inlinestatic |
Definition at line 57 of file pass.h.
References mim::assert_emplace(), and mim::Annex::base().
Referenced by reg_stages().
|
inline |
Definition at line 66 of file pass.h.
References mim::Log::log().
|
inline |
Definition at line 67 of file pass.h.
References name_.
Referenced by mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::ll::Emitter::emit_bb(), mim::ll::Emitter::emit_epilogue(), mim::Emitter< std::string, std::string, BB, Emitter >::Emitter(), mim::FPPass< P, M >::FPPass(), mim::NestPhase< M >::NestPhase(), mim::Pass::Pass(), mim::Phase::Phase(), mim::ll::Emitter::prepare(), mim::Phase::run(), mim::RWPass< P, M >::RWPass(), mim::RWPhase::RWPhase(), and Stage().
|
virtual |
|
inline |
Definition at line 64 of file pass.h.
Referenced by mim::plug::mem::phase::AddMem::AddMem(), mim::TailRecElim::analyze(), mim::PassManPhase::apply(), mim::plug::autodiff::Eval::augment_(), mim::plug::autodiff::Eval::augment_app(), mim::plug::autodiff::Eval::augment_extract(), mim::plug::autodiff::Eval::augment_lam(), mim::plug::autodiff::Eval::augment_pack(), mim::plug::autodiff::Eval::augment_tuple(), mim::BetaRed::BetaRed(), mim::plug::clos::BranchClosElim::BranchClosElim(), mim::plug::clos::Clos2SJLJ::Clos2SJLJ(), mim::plug::clos::ClosConv::ClosConv(), mim::plug::clos::ClosConvPrep::ClosConvPrep(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::ClosedMutPhase< M >::ClosedMutPhase(), mim::plug::mem::pass::CopyProp::CopyProp(), mim::plug::direct::CPS2DS::CPS2DS(), create(), mim::plug::autodiff::Eval::derive_(), driver(), mim::plug::direct::DS2CPS::DS2CPS(), mim::ll::Emitter::emit_epilogue(), mim::Emitter< std::string, std::string, BB, Emitter >::Emitter(), mim::ll::Emitter::Emitter(), mim::plug::clos::Clos2SJLJ::enter(), mim::plug::clos::ClosConvPrep::eta_wrap(), mim::EtaExp::EtaExp(), mim::EtaRed::EtaRed(), mim::plug::autodiff::Eval::Eval(), mim::FPPass< P, M >::FPPass(), mim::FPPass< P, M >::FPPass(), mim::LamSpec::LamSpec(), mim::plug::matrix::LowerMatrixHighLevelMapRed::LowerMatrixHighLevelMapRed(), mim::plug::matrix::LowerMatrixMediumLevel::LowerMatrixMediumLevel(), mim::plug::regex::LowerRegex::LowerRegex(), mim::plug::clos::LowerTypedClos::LowerTypedClos(), mim::plug::clos::LowerTypedClosPrep::LowerTypedClosPrep(), mim::NestPhase< M >::NestPhase(), mim::NestPhase< M >::NestPhase(), mim::RWPhase::old_world(), mim::Pass::Pass(), mim::Pass::Pass(), mim::PassMan::PassMan(), mim::PassManPhase::PassManPhase(), mim::PassManPhase::PassManPhase(), mim::Phase::Phase(), mim::Phase::Phase(), mim::PhaseMan::PhaseMan(), mim::Pass::proxy(), recreate(), mim::Repl::Repl(), mim::ReplMan::ReplMan(), mim::plug::mem::pass::Reshape::Reshape(), mim::LamSpec::rewrite(), mim::plug::clos::BranchClosElim::rewrite(), mim::plug::clos::Clos2SJLJ::rewrite(), mim::plug::clos::LowerTypedClosPrep::rewrite(), mim::plug::direct::DS2CPS::rewrite(), mim::plug::mem::pass::CopyProp::rewrite(), mim::plug::mem::pass::SSA::rewrite(), mim::plug::regex::LowerRegex::rewrite(), mim::Scalarize::rewrite(), mim::TailRecElim::rewrite(), mim::plug::matrix::LowerMatrixHighLevelMapRed::rewrite_(), mim::plug::matrix::LowerMatrixMediumLevel::rewrite_(), mim::plug::clos::ClosConvPrep::rewrite_arg(), mim::PassMan::run(), mim::Phase::run(), mim::RWPass< P, M >::RWPass(), mim::RWPass< P, M >::RWPass(), mim::Scalarize::Scalarize(), mim::plug::mem::pass::SSA::SSA(), Stage(), Stage(), mim::ClosedMutPhase< M >::start(), mim::plug::clos::ClosConv::start(), mim::plug::clos::LowerTypedClos::start(), and mim::TailRecElim::TailRecElim().
|
protected |
Definition at line 76 of file pass.h.
Referenced by mim::EtaRed::apply(), mim::PhaseMan::apply(), mim::plug::mem::pass::CopyProp::apply(), mim::plug::mem::pass::Reshape::apply(), mim::PrefixCleanup::apply(), name(), Stage(), and Stage().