MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Stage Class Reference

Common base for Phase and Pass. More...

#include <mim/pass.h>

Inheritance diagram for mim::Stage:
[legend]

Public Member Functions

Getters
Worldworld ()
 
Driverdriver ()
 
Loglog () 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< Stagerecreate ()
 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)
 

Detailed Description

Common base for Phase and Pass.

Definition at line 26 of file pass.h.

Constructor & Destructor Documentation

◆ Stage() [1/2]

mim::Stage::Stage ( World & world,
std::string name )
inline

◆ Stage() [2/2]

mim::Stage::Stage ( World & world,
flags_t annex )

Definition at line 18 of file pass.cpp.

References annex(), name_, and world().

◆ ~Stage()

virtual mim::Stage::~Stage ( )
virtualdefault

Member Function Documentation

◆ annex()

flags_t mim::Stage::annex ( ) const
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().

◆ apply() [1/2]

virtual void mim::Stage::apply ( const App * )
inlinevirtual

◆ apply() [2/2]

virtual void mim::Stage::apply ( Stage & )
inlinevirtual

◆ create()

static auto mim::Stage::create ( const Flags2Stages & stages,
const Def * def )
inlinestatic

◆ driver()

Driver & mim::Stage::driver ( )
inline

◆ hook()

template<class A, class P>
static void mim::Stage::hook ( Flags2Stages & stages)
inlinestatic

Definition at line 57 of file pass.h.

References mim::assert_emplace(), and mim::Annex::base().

Referenced by reg_stages().

◆ log()

Log & mim::Stage::log ( ) const
inline

Definition at line 66 of file pass.h.

References mim::Log::log().

◆ name()

◆ recreate()

std::unique_ptr< Stage > mim::Stage::recreate ( )
virtual

Creates a new instance; needed by a fixed-point PhaseMan.

Definition at line 23 of file pass.cpp.

References annex(), driver(), mim::Driver::stage(), and world().

◆ world()

World & mim::Stage::world ( )
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().

Member Data Documentation

◆ name_


The documentation for this class was generated from the following files: