GPUOcelot
|
A class to orchestrate the execution of many passes. More...
#include <PassManager.h>
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::Analysis * | getAnalysis (int type) |
Get an up to date analysis by type. | |
const analysis::Analysis * | getAnalysis (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 PassManager & | operator= (const PassManager &) |
Disallow the assignment operator. |
A class to orchestrate the execution of many passes.
typedef std::unordered_map<int, analysis::Analysis*> transforms::PassManager::AnalysisMap |
A map from analysis id to an up to date copy.
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.
module | The module that this manager is associated with. |
transforms::PassManager::PassManager | ( | const PassManager & | ) |
Disallow the copy constructor.
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.
pass | The 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.
name | The name of the kernel to run all passes on. |
void transforms::PassManager::runOnKernel | ( | ir::IRKernel & | kernel | ) |
Runs passes on a specific Kernel.
kernel | The kernel to run all passes on. |
void transforms::PassManager::runOnModule | ( | ) |
Runs passes on the entire module.