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

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

#include <mim/pass/pass.h>

Public Member Functions

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

Friends

template<class P , class M >
class FPPass
 

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()

mim::PassMan::PassMan ( World & world)
inline

Definition at line 109 of file pass.h.

Member Function Documentation

◆ add()

template<class P , class... Args>
P * mim::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 * mim::PassMan::curr_mut ( ) const
inline

Definition at line 117 of file pass.h.

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

◆ fixed_point()

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

Definition at line 116 of file pass.h.

◆ passes()

const auto & mim::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 mim::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 & mim::PassMan::world ( ) const
inline

Definition at line 114 of file pass.h.

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

Friends And Related Symbol Documentation

◆ FPPass

template<class P , class M >
friend class FPPass
friend

Definition at line 214 of file pass.h.


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