LLVM API Documentation
A pass that runs on each Region in a function. More...
#include <RegionPass.h>
Public Member Functions | |
RegionPass (char &pid) | |
To be implemented by every RegionPass | |
virtual bool | runOnRegion (Region *R, RGPassManager &RGM)=0 |
Run the pass on a specific Region. | |
Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const override |
Get a pass to print the LLVM IR in the region. | |
virtual bool | doInitialization (Region *R, RGPassManager &RGM) |
virtual bool | doFinalization () |
PassManager API | |
void | preparePassManager (PMStack &PMS) override |
Check if available pass managers are suitable for this pass or not. | |
void | assignPassManager (PMStack &PMS, PassManagerType PMT=PMT_RegionPassManager) override |
Assign pass manager to manage this pass. | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. |
A pass that runs on each Region in a function.
RegionPass is managed by RGPassManager.
Definition at line 34 of file RegionPass.h.
llvm::RegionPass::RegionPass | ( | char & | pid | ) | [inline, explicit] |
Definition at line 36 of file RegionPass.h.
void RegionPass::assignPassManager | ( | PMStack & | PMS, |
PassManagerType | PMT = PMT_RegionPassManager |
||
) | [override, virtual] |
Assign pass manager to manage this pass.
Reimplemented from llvm::Pass.
Definition at line 238 of file RegionPass.cpp.
References llvm::PMDataManager::add(), llvm::PMTopLevelManager::addIndirectPassManager(), llvm::PMStack::empty(), llvm::PMDataManager::getPassManagerType(), llvm::PMT_RegionPassManager, llvm::PMStack::pop(), llvm::PMDataManager::populateInheritedAnalysis(), llvm::PMStack::push(), llvm::PMTopLevelManager::schedulePass(), and llvm::PMStack::top().
Pass * RegionPass::createPrinterPass | ( | raw_ostream & | O, |
const std::string & | Banner | ||
) | const [override, virtual] |
Get a pass to print the LLVM IR in the region.
Get the printer pass.
O | The output stream to print the Region. |
Banner | The banner to separate different printed passes. |
Implements llvm::Pass.
Definition at line 275 of file RegionPass.cpp.
virtual bool llvm::RegionPass::doFinalization | ( | ) | [inline, virtual] |
Definition at line 65 of file RegionPass.h.
Referenced by llvm::RGPassManager::runOnFunction().
virtual bool llvm::RegionPass::doInitialization | ( | Region * | R, |
RGPassManager & | RGM | ||
) | [inline, virtual] |
Definition at line 64 of file RegionPass.h.
Referenced by llvm::RGPassManager::runOnFunction().
PassManagerType llvm::RegionPass::getPotentialPassManagerType | ( | ) | const [inline, override, virtual] |
Return what kind of Pass Manager can manage this pass.
Reimplemented from llvm::Pass.
Definition at line 77 of file RegionPass.h.
References llvm::PMT_RegionPassManager.
void RegionPass::preparePassManager | ( | PMStack & | ) | [override, virtual] |
Check if available pass managers are suitable for this pass or not.
Reimplemented from llvm::Pass.
Definition at line 221 of file RegionPass.cpp.
References llvm::PMStack::empty(), llvm::PMDataManager::getPassManagerType(), llvm::PMT_RegionPassManager, llvm::PMStack::pop(), llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMStack::top().
virtual bool llvm::RegionPass::runOnRegion | ( | Region * | R, |
RGPassManager & | RGM | ||
) | [pure virtual] |
Run the pass on a specific Region.
Accessing regions not contained in the current region is not allowed.
R | The region this pass is run on. |
RGM | The RegionPassManager that manages this Pass. |
Referenced by llvm::RGPassManager::runOnFunction().