Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::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 <thorin/phase/phase.h>

Inheritance diagram for thorin::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 16 of file phase.h.

Constructor & Destructor Documentation

◆ Phase()

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

Definition at line 18 of file phase.h.

◆ ~Phase()

virtual thorin::Phase::~Phase ( )
virtualdefault

Member Function Documentation

◆ is_dirty()

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

Definition at line 28 of file phase.h.

References dirty_.

◆ name()

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

◆ run() [1/2]

void thorin::Phase::run ( )
virtual

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

Definition at line 7 of file phase.cpp.

References name(), start(), thorin::World::verify(), and world().

Referenced by thorin::ll::emit().

◆ run() [2/2]

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

Runs a single Phase.

Definition at line 36 of file phase.h.

◆ start()

◆ world()

Member Data Documentation

◆ dirty_

bool thorin::Phase::dirty_
protected

Definition at line 47 of file phase.h.

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

◆ name_

std::string thorin::Phase::name_
protected

Definition at line 46 of file phase.h.

Referenced by name().

◆ world_

World& thorin::Phase::world_
protected

Definition at line 45 of file phase.h.

Referenced by world().


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