LLVM API Documentation
#include <Pass.h>
Inheritance diagram for llvm::Pass:


Public Member Functions | |
| Pass (intptr_t pid) | |
| Pass (const void *pid) | |
| virtual | ~Pass () |
| virtual const char * | getPassName () const |
| const PassInfo * | getPassInfo () const |
| virtual void | print (std::ostream &O, const Module *M) const |
| void | print (std::ostream *O, const Module *M) const |
| void | dump () const |
| virtual void | assignPassManager (PMStack &, PassManagerType=PMT_Unknown) |
| virtual void | preparePassManager (PMStack &) |
| Check if available pass managers are suitable for this pass or not. | |
| virtual PassManagerType | getPotentialPassManagerType () const |
| Return what kind of Pass Manager can manage this pass. | |
| void | setResolver (AnalysisResolver *AR) |
| AnalysisResolver * | getResolver () |
| virtual void | getAnalysisUsage (AnalysisUsage &) const |
| virtual void | releaseMemory () |
| virtual void | verifyAnalysis () const |
| virtual void | dumpPassStructure (unsigned Offset=0) |
| template<typename AnalysisType> | |
| AnalysisType * | getAnalysisToUpdate () const |
| bool | mustPreserveAnalysisID (const PassInfo *AnalysisID) const |
| template<typename AnalysisType> | |
| AnalysisType & | getAnalysis () const |
| template<typename AnalysisType> | |
| AnalysisType & | getAnalysis (Function &F) |
| template<typename AnalysisType> | |
| AnalysisType & | getAnalysisID (const PassInfo *PI) const |
| template<typename AnalysisType> | |
| AnalysisType & | getAnalysisID (const PassInfo *PI, Function &F) |
Static Public Member Functions | |
| template<typename AnalysisClass> | |
| const PassInfo * | getClassPassInfo () |
| const PassInfo * | lookupPassInfo (intptr_t TI) |
Definition at line 73 of file Pass.h.
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Each pass is responsible for assigning a pass manager to itself. PMS is the stack of available pass manager. Reimplemented in llvm::LoopPass, llvm::CallGraphSCCPass, llvm::ModulePass, llvm::FunctionPass, and llvm::BasicBlockPass. Definition at line 112 of file Pass.h. Referenced by llvm::PassManagerImpl::addTopLevelPass(), and llvm::FunctionPassManagerImpl::addTopLevelPass(). |
|
|
Reimplemented in BasicCallGraph. Definition at line 67 of file Pass.cpp. References print(). Referenced by llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), and llvm::PMDataManager::verifyDomInfo(). |
|
|
Reimplemented in llvm::LPPassManager, llvm::FPPassManager, CGPassManager, BBPassManager, and llvm::MPPassManager. Definition at line 44 of file Pass.cpp. References getPassName(). Referenced by llvm::PMTopLevelManager::dumpPasses(), llvm::FPPassManager::dumpPassStructure(), llvm::MPPassManager::dumpPassStructure(), BBPassManager::dumpPassStructure(), llvm::LPPassManager::dumpPassStructure(), and CGPassManager::dumpPassStructure(). |
|
||||||||||
|
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. Definition at line 210 of file PassAnalysisSupport.h. |
|
|||||||||
|
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. Definition at line 177 of file PassAnalysisSupport.h. Referenced by IndVarSimplify::doInitialization(), llvm::AliasAnalysis::InitializeAliasAnalysis(), LoopRotate::preserveCanonicalLoopForm(), LCSSA::runOnLoop(), and llvm::SplitBlock(). |
|
||||||||||||||||
|
Definition at line 217 of file PassAnalysisSupport.h. References llvm::AnalysisResolver::findImplPass(). |
|
||||||||||
|
Definition at line 184 of file PassAnalysisSupport.h. References llvm::AnalysisResolver::findImplPass(). |
|
|||||||||
|
getAnalysisToUpdate<AnalysisType>() - This function is used by subclasses to get to the analysis information that might be around that needs to be updated. This is different than getAnalysis in that it can fail (ie the analysis results haven't been computed), so should only be used if you provide the capability to update an analysis that exists. This method is often used by transformation APIs to update analysis results for a pass automatically as the transform is performed. Definition at line 163 of file PassAnalysisSupport.h. References llvm::AnalysisResolver::getAnalysisToUpdate(). Referenced by llvm::CloneLoop(), llvm::SplitBlock(), llvm::SplitBlockPredecessors(), llvm::SplitCriticalEdge(), and llvm::PMDataManager::verifyDomInfo(). |
|
|
|||||||||
|
|
|
|
getPassInfo - Return the PassInfo data structure that corresponds to this pass... If the pass has not been registered, this will return null. Definition at line 202 of file Pass.cpp. References lookupPassInfo(). Referenced by llvm::PMTopLevelManager::findAnalysisPass(), getPassName(), llvm::PMDataManager::preserveHigherLevelAnalysis(), llvm::PMDataManager::recordAvailableAnalysis(), and llvm::PMTopLevelManager::schedulePass(). |
|
|
|
Return what kind of Pass Manager can manage this pass.
Reimplemented in llvm::LoopPass, llvm::CallGraphSCCPass, llvm::ModulePass, llvm::FunctionPass, and llvm::BasicBlockPass. Definition at line 118 of file Pass.h. References llvm::PassManagerType. Referenced by llvm::MPPassManager::addLowerLevelRequiredPass(), and llvm::PMTopLevelManager::schedulePass(). |
|
|
Definition at line 127 of file Pass.h. Referenced by llvm::PMDataManager::add(), llvm::PMDataManager::initializeAnalysisImpl(), and llvm::PMDataManager::verifyDomInfo(). |
|
|
Definition at line 206 of file Pass.cpp. References PassRegistrar::GetPassInfo(), and getPassRegistrar(). Referenced by getPassInfo(). |
|
|
mustPreserveAnalysisID - This method serves the same function as getAnalysisToUpdate, but works if you just have an AnalysisID. This obviously cannot give you a properly typed instance of the class if you don't have the class name available (use getAnalysisToUpdate if you do), but it can tell you if you need to preserve the pass at least. Definition at line 39 of file Pass.cpp. References llvm::AnalysisID, and llvm::AnalysisResolver::getAnalysisToUpdate(). Referenced by InstCombiner::runOnFunction(). |
|
|
Check if available pass managers are suitable for this pass or not.
Reimplemented in llvm::LoopPass. Definition at line 115 of file Pass.h. Referenced by llvm::PMTopLevelManager::schedulePass(). |
|
||||||||||||
|
||||||||||||
|
print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored. Reimplemented in llvm::DominatorTree, llvm::DominanceFrontierBase, llvm::FindUsedTypes, llvm::IntervalPartition, llvm::LoopInfo, llvm::LoopVR, llvm::PostDominatorTree, llvm::ScalarEvolution, llvm::LiveIntervals, llvm::LiveStacks, llvm::MachineDominatorTree, CFGViewer, CFGOnlyViewer, CFGPrinter, CFGOnlyPrinter, InstCount, BasicCallGraph, and llvm::SimpleRegisterCoalescing. Definition at line 62 of file Pass.cpp. References getPassName(). Referenced by dump(), llvm::operator<<(), and llvm::MachineConstantPool::print(). |
|
|
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used. Reimplemented in llvm::DominatorTree, llvm::DominanceFrontierBase, llvm::LoopInfo, llvm::LoopVR, llvm::MemoryDependenceAnalysis, llvm::ScalarEvolution, llvm::LiveIntervals, llvm::LiveStacks, llvm::LiveVariables, llvm::MachineDominatorTree, llvm::MachineLoopInfo, Andersens, BasicCallGraph, llvm::SimpleRegisterCoalescing, and StrongPHIElimination. |
|
|
Definition at line 123 of file Pass.h. Referenced by llvm::PMDataManager::add(), llvm::PassManagerImpl::addTopLevelPass(), llvm::FunctionPassManagerImpl::addTopLevelPass(), and llvm::FunctionPassManager::FunctionPassManager(). |
|
|
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. Reimplemented in LoopSimplify. Definition at line 155 of file Pass.h. Referenced by llvm::PMDataManager::verifyPreservedAnalysis(). |