LLVM API Documentation
#include <PassRegistry.h>
Classes | |
struct | AnalysisGroupInfo |
AnalysisGroupInfo - Keep track of information for each analysis group. | |
Public Member Functions | |
PassRegistry () | |
~PassRegistry () | |
const PassInfo * | getPassInfo (const void *TI) const |
const PassInfo * | getPassInfo (StringRef Arg) const |
void | registerPass (const PassInfo &PI, bool ShouldFree=false) |
void | unregisterPass (const PassInfo &PI) |
void | registerAnalysisGroup (const void *InterfaceID, const void *PassID, PassInfo &Registeree, bool isDefault, bool ShouldFree=false) |
registerAnalysisGroup - Register an analysis group (or a pass implementing | |
void | enumerateWith (PassRegistrationListener *L) |
void | addRegistrationListener (PassRegistrationListener *L) |
void | removeRegistrationListener (PassRegistrationListener *L) |
Static Public Member Functions | |
static PassRegistry * | getPassRegistry () |
PassRegistry - This class manages the registration and intitialization of the pass subsystem as application startup, and assists the PassManager in resolving pass dependencies. NOTE: PassRegistry is NOT thread-safe. If you want to use LLVM on multiple threads simultaneously, you will need to use a separate PassRegistry on each thread.
Definition at line 41 of file PassRegistry.h.
llvm::PassRegistry::PassRegistry | ( | ) | [inline] |
Definition at line 61 of file PassRegistry.h.
Definition at line 39 of file PassRegistry.cpp.
addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() callbacks whenever a new pass is registered.
Definition at line 136 of file PassRegistry.cpp.
References Lock.
Referenced by llvm::PassNameParser::PassNameParser().
void PassRegistry::enumerateWith | ( | PassRegistrationListener * | L | ) |
enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's passEnumerate() callback on each of them.
Definition at line 84 of file PassRegistry.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::begin(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), I, Lock, and llvm::PassRegistrationListener::passEnumerate().
Referenced by llvm::PassRegistrationListener::enumeratePasses().
const PassInfo * PassRegistry::getPassInfo | ( | const void * | TI | ) | const |
getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' type identifier (&MyPass::ID).
Definition at line 42 of file PassRegistry.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), I, and Lock.
Referenced by llvm::PMDataManager::add(), llvm::TargetPassConfig::addMachinePasses(), llvm::Pass::createPass(), llvm::PMTopLevelManager::dumpArguments(), llvm::PMTopLevelManager::findAnalysisPass(), llvm::Pass::getPassName(), llvm::Pass::lookupPassInfo(), llvm::PMDataManager::recordAvailableAnalysis(), registerAnalysisGroup(), and llvm::PMTopLevelManager::schedulePass().
const PassInfo * PassRegistry::getPassInfo | ( | StringRef | Arg | ) | const |
getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' argument string.
Definition at line 48 of file PassRegistry.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), I, Lock, and llvm::StringMapEntry< ValueTy >::second.
PassRegistry * PassRegistry::getPassRegistry | ( | ) | [static] |
getPassRegistry - Access the global registry object, which is automatically initialized at application launch and destroyed by llvm_shutdown.
Definition at line 31 of file PassRegistry.cpp.
References PassRegistryObj.
Referenced by llvm::PMDataManager::add(), llvm::TargetPassConfig::addMachinePasses(), llvm::AssumptionTracker::AssumptionTracker(), llvm::BlockFrequencyInfo::BlockFrequencyInfo(), llvm::BranchProbabilityInfo::BranchProbabilityInfo(), llvm::CallGraphWrapperPass::CallGraphWrapperPass(), llvm::Pass::createPass(), llvm::DataLayoutPass::DataLayoutPass(), llvm::DependenceAnalysis::DependenceAnalysis(), llvm::DominanceFrontier::DominanceFrontier(), llvm::DominatorTreeWrapperPass::DominatorTreeWrapperPass(), llvm::PMTopLevelManager::dumpArguments(), llvm::PMDataManager::dumpPassArguments(), llvm::PassRegistrationListener::enumeratePasses(), llvm::PMTopLevelManager::findAnalysisPass(), llvm::FindUsedTypes::FindUsedTypes(), llvm::PMDataManager::freePass(), llvm::GCModuleInfo::GCModuleInfo(), llvm::Pass::getPassName(), initialize(), INITIALIZE_PASS(), llvm::InstCombiner::InstCombiner(), llvm::IntervalPartition::IntervalPartition(), llvm::IVUsers::IVUsers(), llvm::JumpInstrTableInfo::JumpInstrTableInfo(), llvm::JumpInstrTables::JumpInstrTables(), llvm::LazyValueInfo::LazyValueInfo(), llvm::LibCallAliasAnalysis::LibCallAliasAnalysis(), llvm::LiveDebugVariables::LiveDebugVariables(), llvm::LiveIntervals::LiveIntervals(), llvm::LiveStacks::LiveStacks(), llvm::LiveVariables::LiveVariables(), LLVMGetGlobalPassRegistry(), LLVMInitializeNVPTXTarget(), llvm::Pass::lookupPassInfo(), llvm::LoopInfo::LoopInfo(), llvm::MachineBlockFrequencyInfo::MachineBlockFrequencyInfo(), llvm::MachineBranchProbabilityInfo::MachineBranchProbabilityInfo(), llvm::MachineDominanceFrontier::MachineDominanceFrontier(), llvm::MachineDominatorTree::MachineDominatorTree(), llvm::MachineFunctionAnalysis::MachineFunctionAnalysis(), llvm::MachineLoopInfo::MachineLoopInfo(), llvm::MachineModuleInfo::MachineModuleInfo(), llvm::MachineRegionInfoPass::MachineRegionInfoPass(), llvm::MemoryDependenceAnalysis::MemoryDependenceAnalysis(), llvm::objcarc::ObjCARCAliasAnalysis::ObjCARCAliasAnalysis(), llvm::PassNameParser::PassNameParser(), llvm::PEI::PEI(), llvm::PostDominatorTree::PostDominatorTree(), llvm::PMDataManager::recordAvailableAnalysis(), llvm::RegionInfoPass::RegionInfoPass(), llvm::RegisterAGBase::RegisterAGBase(), llvm::RegisterPass< passName >::RegisterPass(), llvm::ScalarEvolution::ScalarEvolution(), llvm::PMTopLevelManager::schedulePass(), llvm::SelectionDAGISel::SelectionDAGISel(), llvm::SlotIndexes::SlotIndexes(), llvm::StackProtector::StackProtector(), llvm::TargetPassConfig::TargetPassConfig(), and llvm::UnifyFunctionExitNodes::UnifyFunctionExitNodes().
void PassRegistry::registerAnalysisGroup | ( | const void * | InterfaceID, |
const void * | PassID, | ||
PassInfo & | Registeree, | ||
bool | isDefault, | ||
bool | ShouldFree = false |
||
) |
registerAnalysisGroup - Register an analysis group (or a pass implementing
Analysis Group Mechanisms.
Definition at line 92 of file PassRegistry.cpp.
References llvm::PassInfo::addInterfaceImplemented(), llvm::PassInfo::getNormalCtor(), getPassInfo(), llvm::PassInfo::getTargetMachineCtor(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::insert(), llvm::PassInfo::isAnalysisGroup(), Lock, registerPass(), llvm::PassInfo::setNormalCtor(), and llvm::PassInfo::setTargetMachineCtor().
Referenced by llvm::RegisterAGBase::RegisterAGBase().
void PassRegistry::registerPass | ( | const PassInfo & | PI, |
bool | ShouldFree = false |
||
) |
registerPass - Register a pass (by means of its PassInfo) with the registry. Required in order to use the pass with a PassManager.
Definition at line 58 of file PassRegistry.cpp.
References llvm::PassInfo::getPassArgument(), llvm::PassInfo::getTypeInfo(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::insert(), and Lock.
Referenced by initializePassOnce(), registerAnalysisGroup(), and llvm::RegisterPass< passName >::RegisterPass().
removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives passRegistered() callbacks.
Definition at line 141 of file PassRegistry.cpp.
void PassRegistry::unregisterPass | ( | const PassInfo & | PI | ) |
registerPass - Unregister a pass (by means of its PassInfo) with the registry.
Definition at line 74 of file PassRegistry.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase(), llvm::StringMap< ValueTy, AllocatorTy >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::PassInfo::getPassArgument(), llvm::PassInfo::getTypeInfo(), I, and Lock.