MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Phase Class Referenceabstract

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>

Inheritance diagram for mim::Phase:
[legend]

Public Member Functions

Construction & Destruction
 Phase (World &world, std::string name)
 
 Phase (World &world, flags_t annex)
 
Getters
bool todo () const
 
- Public Member Functions inherited from mim::Stage
Worldworld ()
 
Driverdriver ()
 
Loglog () 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< 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.
 

Protected Attributes

bool todo_ = false
 Set to true to indicate that you want to rerun all Phasees in current your fixed-point PhaseMan.
 
- Protected Attributes inherited from mim::Stage
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)
 

Detailed Description

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.

Definition at line 26 of file phase.h.

Constructor & Destructor Documentation

◆ Phase() [1/2]

◆ Phase() [2/2]

mim::Phase::Phase ( World & world,
flags_t annex )
inline

Definition at line 32 of file phase.h.

References mim::Stage::annex(), mim::Stage::Stage(), and mim::Stage::world().

Member Function Documentation

◆ run() [1/2]

void mim::Phase::run ( )
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().

◆ run() [2/2]

template<class P, class... Args>
static void mim::Phase::run ( Args &&... args)
inlinestatic

Runs a single Phase.

Definition at line 49 of file phase.h.

◆ start()

◆ todo()

bool mim::Phase::todo ( ) const
inline

Definition at line 39 of file phase.h.

References todo_.

Referenced by mim::ReplManPhase::rewrite(), mim::PhaseMan::start(), and mim::RWPhase::start().

Member Data Documentation

◆ todo_

bool mim::Phase::todo_ = false
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().


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