LLVM  4.0.0
Public Member Functions | Static Public Member Functions | List of all members
llvm::PassRegistry Class Reference

PassRegistry - This class manages the registration and intitialization of the pass subsystem as application startup, and assists the PassManager in resolving pass dependencies. More...

#include <PassRegistry.h>

Public Member Functions

 PassRegistry ()
 
 ~PassRegistry ()
 
const PassInfogetPassInfo (const void *TI) const
 getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' type identifier (&MyPass::ID). More...
 
const PassInfogetPassInfo (StringRef Arg) const
 getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' argument string. More...
 
void registerPass (const PassInfo &PI, bool ShouldFree=false)
 registerPass - Register a pass (by means of its PassInfo) with the registry. More...
 
void registerAnalysisGroup (const void *InterfaceID, const void *PassID, PassInfo &Registeree, bool isDefault, bool ShouldFree=false)
 registerAnalysisGroup - Register an analysis group (or a pass implementing More...
 
void enumerateWith (PassRegistrationListener *L)
 enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's passEnumerate() callback on each of them. More...
 
void addRegistrationListener (PassRegistrationListener *L)
 addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() callbacks whenever a new pass is registered. More...
 
void removeRegistrationListener (PassRegistrationListener *L)
 removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives passRegistered() callbacks. More...
 

Static Public Member Functions

static PassRegistrygetPassRegistry ()
 getPassRegistry - Access the global registry object, which is automatically initialized at application launch and destroyed by llvm_shutdown. More...
 

Detailed Description

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 40 of file PassRegistry.h.

Constructor & Destructor Documentation

llvm::PassRegistry::PassRegistry ( )
inline

Definition at line 54 of file PassRegistry.h.

PassRegistry::~PassRegistry ( )

Definition at line 36 of file PassRegistry.cpp.

Member Function Documentation

void PassRegistry::addRegistrationListener ( PassRegistrationListener L)

addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() callbacks whenever a new pass is registered.

Definition at line 117 of file PassRegistry.cpp.

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 70 of file PassRegistry.cpp.

References llvm::PassRegistrationListener::passEnumerate().

Referenced by llvm::PassRegistrationListener::enumeratePasses().

const PassInfo * PassRegistry::getPassInfo ( const void *  TI) const
const PassInfo * PassRegistry::getPassInfo ( StringRef  Arg) const

getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' argument string.

Definition at line 44 of file PassRegistry.cpp.

References llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), I, 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 28 of file PassRegistry.cpp.

References PassRegistryObj.

Referenced by llvm::AAEvalLegacyPass::AAEvalLegacyPass(), llvm::AAResultsWrapperPass::AAResultsWrapperPass(), llvm::TargetPassConfig::addMachinePasses(), llvm::AssumptionCacheTracker::AssumptionCacheTracker(), llvm::BasicAAWrapperPass::BasicAAWrapperPass(), llvm::BlockFrequencyInfoWrapperPass::BlockFrequencyInfoWrapperPass(), llvm::BranchProbabilityInfoWrapperPass::BranchProbabilityInfoWrapperPass(), llvm::CallGraphWrapperPass::CallGraphWrapperPass(), llvm::CFLAndersAAWrapperPass::CFLAndersAAWrapperPass(), llvm::CFLSteensAAWrapperPass::CFLSteensAAWrapperPass(), llvm::Pass::createPass(), llvm::DemandedBitsWrapperPass::DemandedBitsWrapperPass(), llvm::DependenceAnalysisWrapperPass::DependenceAnalysisWrapperPass(), llvm::DivergenceAnalysis::DivergenceAnalysis(), llvm::DominanceFrontierWrapperPass::DominanceFrontierWrapperPass(), llvm::DominatorTreeWrapperPass::DominatorTreeWrapperPass(), llvm::DummyCGSCCPass::DummyCGSCCPass(), llvm::PassRegistrationListener::enumeratePasses(), llvm::PMTopLevelManager::findAnalysisPassInfo(), llvm::GCModuleInfo::GCModuleInfo(), llvm::Pass::getPassName(), llvm::GlobalsAAWrapperPass::GlobalsAAWrapperPass(), llvm::gvn::GVNLegacyPass::GVNLegacyPass(), llvm::HexagonTargetMachine::HexagonTargetMachine(), INITIALIZE_PASS(), INITIALIZE_PASS_END(), llvm::InstructionCombiningPass::InstructionCombiningPass(), llvm::InstructionSelect::InstructionSelect(), llvm::IntervalPartition::IntervalPartition(), llvm::IRTranslator::IRTranslator(), llvm::IVUsersWrapperPass::IVUsersWrapperPass(), llvm::LazyBlockFrequencyInfoPass::LazyBlockFrequencyInfoPass(), llvm::LazyBranchProbabilityInfoPass::LazyBranchProbabilityInfoPass(), llvm::LazyValueInfoWrapperPass::LazyValueInfoWrapperPass(), llvm::LCSSAVerificationPass::LCSSAVerificationPass(), llvm::Legalizer::Legalizer(), llvm::LiveDebugVariables::LiveDebugVariables(), llvm::LiveIntervals::LiveIntervals(), llvm::LiveStacks::LiveStacks(), llvm::LiveVariables::LiveVariables(), LLVMGetGlobalPassRegistry(), LLVMInitializeAArch64Target(), LLVMInitializeAMDGPUTarget(), LLVMInitializeARMTarget(), llvm::LLVMInitializeAVRTarget(), LLVMInitializeNVPTXTarget(), LLVMInitializePowerPCTarget(), LLVMInitializeWebAssemblyTarget(), LLVMInitializeX86Target(), llvm::Pass::lookupPassInfo(), llvm::LoopAccessLegacyAnalysis::LoopAccessLegacyAnalysis(), llvm::LoopInfoWrapperPass::LoopInfoWrapperPass(), llvm::MachineBlockFrequencyInfo::MachineBlockFrequencyInfo(), llvm::MachineBranchProbabilityInfo::MachineBranchProbabilityInfo(), llvm::MachineDominanceFrontier::MachineDominanceFrontier(), llvm::MachineDominatorTree::MachineDominatorTree(), llvm::MachineLoopInfo::MachineLoopInfo(), llvm::MachineModuleInfo::MachineModuleInfo(), llvm::MachineRegionInfoPass::MachineRegionInfoPass(), llvm::MemoryDependenceWrapperPass::MemoryDependenceWrapperPass(), llvm::MemorySSAPrinterLegacyPass::MemorySSAPrinterLegacyPass(), llvm::MemorySSAWrapperPass::MemorySSAWrapperPass(), llvm::ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass(), NewGVN::NewGVN(), llvm::objcarc::ObjCARCAAWrapperPass::ObjCARCAAWrapperPass(), llvm::OptimizationRemarkEmitterWrapperPass::OptimizationRemarkEmitterWrapperPass(), llvm::PassNameParser::PassNameParser(), llvm::PhysicalRegisterUsageInfo::PhysicalRegisterUsageInfo(), llvm::PostDominatorTreeWrapperPass::PostDominatorTreeWrapperPass(), llvm::RegionInfoPass::RegionInfoPass(), llvm::RegisterAGBase::RegisterAGBase(), llvm::RegisterPass< passName >::RegisterPass(), llvm::ScalarEvolutionWrapperPass::ScalarEvolutionWrapperPass(), llvm::SCEVAAWrapperPass::SCEVAAWrapperPass(), llvm::ScopedNoAliasAAWrapperPass::ScopedNoAliasAAWrapperPass(), llvm::SelectionDAGISel::SelectionDAGISel(), llvm::SlotIndexes::SlotIndexes(), llvm::StackProtector::StackProtector(), llvm::TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(), llvm::TargetPassConfig::TargetPassConfig(), llvm::TargetTransformInfoWrapperPass::TargetTransformInfoWrapperPass(), llvm::TypeBasedAAWrapperPass::TypeBasedAAWrapperPass(), and llvm::UnifyFunctionExitNodes::UnifyFunctionExitNodes().

void PassRegistry::registerAnalysisGroup ( const void *  InterfaceID,
const void *  PassID,
PassInfo Registeree,
bool  isDefault,
bool  ShouldFree = false 
)
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 54 of file PassRegistry.cpp.

References assert(), llvm::PassInfo::getPassArgument(), llvm::PassInfo::getTypeInfo(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert().

Referenced by registerAnalysisGroup(), and llvm::RegisterPass< passName >::RegisterPass().

void PassRegistry::removeRegistrationListener ( PassRegistrationListener L)

removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives passRegistered() callbacks.

Definition at line 122 of file PassRegistry.cpp.

References llvm::find(), and I.


The documentation for this class was generated from the following files: