LLVM
8.0.1
|
PMTopLevelManager manages LastUser info and collects common APIs used by top level pass managers. More...
#include "llvm/IR/LegacyPassManagers.h"
Public Member Functions | |
void | schedulePass (Pass *P) |
Schedule pass P for execution. More... | |
void | setLastUser (ArrayRef< Pass *> AnalysisPasses, Pass *P) |
Set pass P as the last user of the given analysis passes. More... | |
void | collectLastUses (SmallVectorImpl< Pass *> &LastUses, Pass *P) |
Collect passes whose last user is P. More... | |
Pass * | findAnalysisPass (AnalysisID AID) |
Find the pass that implements Analysis AID. More... | |
const PassInfo * | findAnalysisPassInfo (AnalysisID AID) const |
Retrieve the PassInfo for an analysis. More... | |
AnalysisUsage * | findAnalysisUsage (Pass *P) |
Find analysis usage information for the pass P. More... | |
virtual | ~PMTopLevelManager () |
Destructor. More... | |
void | addImmutablePass (ImmutablePass *P) |
Add immutable pass and initialize it. More... | |
SmallVectorImpl< ImmutablePass * > & | getImmutablePasses () |
void | addPassManager (PMDataManager *Manager) |
void | addIndirectPassManager (PMDataManager *Manager) |
void | dumpPasses () const |
void | dumpArguments () const |
Public Attributes | |
PMStack | activeStack |
Protected Member Functions | |
PMTopLevelManager (PMDataManager *PMDM) | |
Initialize top level manager. Create first pass manager. More... | |
unsigned | getNumContainedManagers () const |
void | initializeAllAnalysisInfo () |
Protected Attributes | |
SmallVector< PMDataManager *, 8 > | PassManagers |
Collection of pass managers. More... | |
PMTopLevelManager manages LastUser info and collects common APIs used by top level pass managers.
Definition at line 166 of file LegacyPassManagers.h.
|
explicitprotected |
Initialize top level manager. Create first pass manager.
Definition at line 595 of file LegacyPassManager.cpp.
References llvm::PMDataManager::setTopLevelManager().
|
virtual |
void PMTopLevelManager::addImmutablePass | ( | ImmutablePass * | P | ) |
Add immutable pass and initialize it.
Definition at line 836 of file LegacyPassManager.cpp.
References assert(), llvm::PassInfo::getInterfacesImplemented(), llvm::Pass::getPassID(), llvm::ImmutablePass::initializePass(), and P.
|
inline |
Definition at line 218 of file LegacyPassManagers.h.
Referenced by llvm::LoopPass::assignPassManager(), llvm::CallGraphSCCPass::assignPassManager(), llvm::RegionPass::assignPassManager(), llvm::FunctionPass::assignPassManager(), and llvm::BasicBlockPass::assignPassManager().
|
inline |
Definition at line 212 of file LegacyPassManagers.h.
void PMTopLevelManager::collectLastUses | ( | SmallVectorImpl< Pass *> & | LastUses, |
Pass * | P | ||
) |
Collect passes whose last user is P.
Definition at line 652 of file LegacyPassManager.cpp.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and llvm::SmallVectorTemplateBase< T >::push_back().
void PMTopLevelManager::dumpArguments | ( | ) | const |
Definition at line 873 of file LegacyPassManager.cpp.
References Arguments, assert(), llvm::dbgs(), and P.
void PMTopLevelManager::dumpPasses | ( | ) | const |
Definition at line 855 of file LegacyPassManager.cpp.
Pass * PMTopLevelManager::findAnalysisPass | ( | AnalysisID | AID | ) |
Find the pass that implements Analysis AID.
Search immutable passes and all pass managers. If desired pass is not found then return NULL.
Definition at line 806 of file LegacyPassManager.cpp.
References P.
const PassInfo * PMTopLevelManager::findAnalysisPassInfo | ( | AnalysisID | AID | ) | const |
Retrieve the PassInfo for an analysis.
Definition at line 825 of file LegacyPassManager.cpp.
References assert(), llvm::PassRegistry::getPassInfo(), getPassInfo(), and llvm::PassRegistry::getPassRegistry().
AnalysisUsage * PMTopLevelManager::findAnalysisUsage | ( | Pass * | P | ) |
Find analysis usage information for the pass P.
Definition at line 666 of file LegacyPassManager.cpp.
References llvm::Pass::getAnalysisUsage().
|
inline |
Definition at line 208 of file LegacyPassManagers.h.
|
inlineprotected |
Definition at line 170 of file LegacyPassManagers.h.
References P.
|
protected |
Definition at line 890 of file LegacyPassManager.cpp.
References llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::SystemZISD::IPM.
void PMTopLevelManager::schedulePass | ( | Pass * | P | ) |
Schedule pass P for execution.
Make sure that passes required by P are run before P is run. Update analysis info maintained by the manager. Remove dead passes. This is a recursive function.
Definition at line 702 of file LegacyPassManager.cpp.
References assert(), llvm::Pass::assignPassManager(), llvm::PassInfo::createPass(), llvm::Pass::createPrinterPass(), llvm::dbgs(), llvm::Pass::getAsImmutablePass(), llvm::PassInfo::getPassArgument(), llvm::Pass::getPassID(), llvm::Pass::getPassName(), llvm::Pass::getPotentialPassManagerType(), llvm::AnalysisUsage::getRequiredSet(), llvm::PMDataManager::initializeAnalysisImpl(), llvm::PassInfo::isAnalysis(), P, llvm::Pass::preparePassManager(), llvm::PMDataManager::recordAvailableAnalysis(), llvm::Pass::setResolver(), llvm::shouldPrintAfterPass(), and llvm::shouldPrintBeforePass().
Referenced by llvm::LoopPass::assignPassManager(), llvm::CallGraphSCCPass::assignPassManager(), and llvm::RegionPass::assignPassManager().
Set pass P as the last user of the given analysis passes.
Definition at line 603 of file LegacyPassManager.cpp.
References assert(), llvm::PMDataManager::getAsPass(), llvm::PMDataManager::getDepth(), llvm::AnalysisResolver::getPMDataManager(), llvm::AnalysisUsage::getRequiredTransitiveSet(), llvm::Pass::getResolver(), P, and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by llvm::FPPassManager::doFinalization().
PMStack llvm::PMTopLevelManager::activeStack |
Definition at line 227 of file LegacyPassManagers.h.
Referenced by llvm::RGPassManager::runOnFunction(), and llvm::LPPassManager::runOnFunction().
|
protected |
Collection of pass managers.
Definition at line 231 of file LegacyPassManagers.h.