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/phase.h>

Inheritance diagram for mim::Phase:
[legend]

Public Member Functions

 Phase (World &world, std::string_view name, bool dirty)
 
virtual ~Phase ()=default
 
Getters
Worldworld ()
 
std::string_view name () const
 
bool is_dirty () const
 

Protected Member Functions

virtual void start ()=0
 Actual entry.
 

Protected Attributes

Worldworld_
 
std::string name_
 
bool dirty_
 

run

virtual void run ()
 Entry point and generates some debug output; invokes Phase::start.
 
template<class P , class... Args>
static void run (Args &&... args)
 Runs a single Phase.
 

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. Phase::dirty indicates whether we may need a Cleanup afterwards.

Definition at line 15 of file phase.h.

Constructor & Destructor Documentation

◆ Phase()

mim::Phase::Phase ( World & world,
std::string_view name,
bool dirty )
inline

Definition at line 17 of file phase.h.

◆ ~Phase()

virtual mim::Phase::~Phase ( )
virtualdefault

Member Function Documentation

◆ is_dirty()

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

Definition at line 27 of file phase.h.

References dirty_.

◆ name()

std::string_view mim::Phase::name ( ) const
inline

◆ run() [1/2]

void mim::Phase::run ( )
virtual

Entry point and generates some debug output; invokes Phase::start.

Definition at line 5 of file phase.cpp.

References name(), start(), mim::World::verify(), and 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 35 of file phase.h.

◆ start()

◆ world()

Member Data Documentation

◆ dirty_

bool mim::Phase::dirty_
protected

Definition at line 46 of file phase.h.

Referenced by mim::plug::mem::AddMem::AddMem(), and is_dirty().

◆ name_

std::string mim::Phase::name_
protected

Definition at line 45 of file phase.h.

Referenced by name().

◆ world_

World& mim::Phase::world_
protected

Definition at line 44 of file phase.h.

Referenced by world().


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