Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::PassMan Class Reference

An optimizer that combines several optimizations in an optimal way. More...

#include <thorin/pass/pass.h>

Public Member Functions

 PassMan (World &world)
 
Getters
Worldworld () const
 
const auto & passes () const
 
bool fixed_point () const
 
Defcurr_mut () const
 

Create and run Passes

void run ()
 Run all registered passes on the whole World.
 
template<class P , class... Args>
P * add (Args &&... args)
 Add a pass to this PassMan.
 
template<class P , class... Args>
static void run (World &world, Args &&... args)
 Runs a single Pass.
 

Detailed Description

An optimizer that combines several optimizations in an optimal way.

This is loosely based upon: "Composing dataflow analyses and transformations" by Lerner, Grove, Chambers.

Definition at line 107 of file pass.h.

Constructor & Destructor Documentation

◆ PassMan()

thorin::PassMan::PassMan ( World world)
inline

Definition at line 109 of file pass.h.

Member Function Documentation

◆ add()

template<class P , class... Args>
P * thorin::PassMan::add ( Args &&...  args)
inline

Add a pass to this PassMan.

If a pass of the same class has been added already, returns the earlier added instance.

Definition at line 126 of file pass.h.

Referenced by run().

◆ curr_mut()

Def * thorin::PassMan::curr_mut ( ) const
inline

Definition at line 117 of file pass.h.

Referenced by thorin::RWPass< P, M >::curr_mut(), and thorin::RWPass< P, M >::inspect().

◆ fixed_point()

bool thorin::PassMan::fixed_point ( ) const
inline

Definition at line 116 of file pass.h.

◆ passes()

const auto & thorin::PassMan::passes ( ) const
inline

Definition at line 115 of file pass.h.

Referenced by run().

◆ run() [1/2]

◆ run() [2/2]

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

Runs a single Pass.

Definition at line 138 of file pass.h.

References add(), run(), and world().

◆ world()

World & thorin::PassMan::world ( ) const
inline

Definition at line 114 of file pass.h.

Referenced by run(), run(), and thorin::Pass::world().


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