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. More... | |
Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const |
Get a pass to print the LLVM IR in the region. More... | |
virtual bool | doInitialization (Region *R, RGPassManager &RGM) |
virtual bool | doFinalization () |
PassManager API | |
void | preparePassManager (PMStack &PMS) |
Check if available pass managers are suitable for this pass or not. More... | |
virtual void | assignPassManager (PMStack &PMS, PassManagerType PMT=PMT_RegionPassManager) |
Assign pass manager to manage this pass. More... | |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. More... | |
![]() | |
Pass (PassKind K, char &pid) | |
virtual | ~Pass () |
PassKind | getPassKind () const |
virtual const char * | getPassName () const |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual bool | doInitialization (Module &) |
virtual bool | doFinalization (Module &) |
virtual void | print (raw_ostream &O, const Module *M) const |
void | dump () const |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | getAnalysisUsage (AnalysisUsage &) const |
virtual void | releaseMemory () |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
bool | mustPreserveAnalysisID (char &AID) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F) |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F) |
Additional Inherited Members | |
![]() | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
A pass that runs on each Region in a function.
RegionPass is managed by RGPassManager.
Definition at line 34 of file RegionPass.h.
|
inlineexplicit |
Definition at line 36 of file RegionPass.h.
|
virtual |
Assign pass manager to manage this pass.
Reimplemented from llvm::Pass.
Definition at line 235 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().
|
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 272 of file RegionPass.cpp.
|
inlinevirtual |
Definition at line 64 of file RegionPass.h.
Referenced by llvm::RGPassManager::runOnFunction().
|
inlinevirtual |
Definition at line 63 of file RegionPass.h.
Referenced by llvm::RGPassManager::runOnFunction().
|
inlinevirtual |
Return what kind of Pass Manager can manage this pass.
Reimplemented from llvm::Pass.
Definition at line 76 of file RegionPass.h.
References llvm::PMT_RegionPassManager.
|
virtual |
Check if available pass managers are suitable for this pass or not.
Reimplemented from llvm::Pass.
Definition at line 218 of file RegionPass.cpp.
References llvm::PMStack::empty(), llvm::PMDataManager::getPassManagerType(), llvm::PMT_RegionPassManager, llvm::PMStack::pop(), llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMStack::top().
|
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().