GPUOcelot
Public Types | Public Member Functions

transforms::PassManager Class Reference

A class to orchestrate the execution of many passes. More...

#include <PassManager.h>

Collaboration diagram for transforms::PassManager:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::unordered_map
< int, analysis::Analysis * > 
AnalysisMap
 A map from analysis id to an up to date copy.

Public Member Functions

 PassManager (ir::Module *module)
 The constructor creates an empty pass manager associated with an existing Module.
void addPass (Pass &pass)
 Adds a pass that needs to be eventually run.
void clear ()
 Clears all added passes.
void destroyPasses ()
 Deletes all added passes.
void runOnKernel (const std::string &name)
 Runs passes on a specific Kernel contained in the module.
void runOnKernel (ir::IRKernel &kernel)
 Runs passes on a specific Kernel.
void runOnModule ()
 Runs passes on the entire module.
analysis::AnalysisgetAnalysis (int type)
 Get an up to date analysis by type.
const analysis::AnalysisgetAnalysis (int type) const
 Get an up to date analysis by type (const)
void invalidateAnalysis (int type)
 Invalidate the analysis, the pass manager will need to generate it again the next time 'get' is called.
 PassManager (const PassManager &)
 Disallow the copy constructor.
const PassManageroperator= (const PassManager &)
 Disallow the assignment operator.

Detailed Description

A class to orchestrate the execution of many passes.


Member Typedef Documentation

typedef std::unordered_map<int, analysis::Analysis*> transforms::PassManager::AnalysisMap

A map from analysis id to an up to date copy.


Constructor & Destructor Documentation

transforms::PassManager::PassManager ( ir::Module module) [explicit]

The constructor creates an empty pass manager associated with an existing Module.

The module is not owned by the PassManager.

Parameters:
moduleThe module that this manager is associated with.
transforms::PassManager::PassManager ( const PassManager )

Disallow the copy constructor.


Member Function Documentation

void transforms::PassManager::addPass ( Pass pass)

Adds a pass that needs to be eventually run.

The pass is not owned by the manager and must not be deallocated before it is run by the manager.

Parameters:
passThe pass being added
void transforms::PassManager::clear ( )

Clears all added passes.

void transforms::PassManager::destroyPasses ( )

Deletes all added passes.

const analysis::Analysis * transforms::PassManager::getAnalysis ( int  type) const

Get an up to date analysis by type (const)

analysis::Analysis * transforms::PassManager::getAnalysis ( int  type)

Get an up to date analysis by type.

void transforms::PassManager::invalidateAnalysis ( int  type)

Invalidate the analysis, the pass manager will need to generate it again the next time 'get' is called.

const PassManager& transforms::PassManager::operator= ( const PassManager )

Disallow the assignment operator.

void transforms::PassManager::runOnKernel ( const std::string &  name)

Runs passes on a specific Kernel contained in the module.

Parameters:
nameThe name of the kernel to run all passes on.
void transforms::PassManager::runOnKernel ( ir::IRKernel kernel)

Runs passes on a specific Kernel.

Parameters:
kernelThe kernel to run all passes on.
void transforms::PassManager::runOnModule ( )

Runs passes on the entire module.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines