LLVM  6.0.0svn
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 "llvm/PassRegistry.h"

Public Member Functions

 PassRegistry ()=default
 
 ~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 39 of file PassRegistry.h.

Constructor & Destructor Documentation

◆ PassRegistry()

llvm::PassRegistry::PassRegistry ( )
default

◆ ~PassRegistry()

PassRegistry::~PassRegistry ( )
default

Referenced by getPassRegistry().

Member Function Documentation

◆ addRegistrationListener()

void PassRegistry::addRegistrationListener ( PassRegistrationListener L)

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

Definition at line 119 of file PassRegistry.cpp.

Referenced by llvm::PassNameParser::PassNameParser().

◆ enumerateWith()

void PassRegistry::enumerateWith ( PassRegistrationListener L)

enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's passEnumerate() callback on each of them.

Definition at line 74 of file PassRegistry.cpp.

References llvm::PassRegistrationListener::passEnumerate().

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

◆ getPassInfo() [1/2]

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

◆ getPassInfo() [2/2]

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(), and I.

◆ getPassRegistry()

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

References PassRegistryObj, and ~PassRegistry().

Referenced by llvm::AAEvalLegacyPass::AAEvalLegacyPass(), llvm::AAResultsWrapperPass::AAResultsWrapperPass(), addAcyclicInnerLoop(), llvm::DOTGraphTraits< RegionInfo * >::addCustomGraphFeatures(), llvm::TargetPassConfig::addMachinePasses(), llvm::addStringMetadataToLoop(), llvm::AMDGPUAAWrapperPass::AMDGPUAAWrapperPass(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::AssumptionCacheTracker::AssumptionCacheTracker(), llvm::BasicAAWrapperPass::BasicAAWrapperPass(), llvm::BlockFrequencyInfoWrapperPass::BlockFrequencyInfoWrapperPass(), llvm::BranchProbabilityInfoWrapperPass::BranchProbabilityInfoWrapperPass(), llvm::CallGraphWrapperPass::CallGraphWrapperPass(), llvm::AAResults::canInstructionRangeModRef(), llvm::CFLAndersAAWrapperPass::CFLAndersAAWrapperPass(), llvm::CFLSteensAAWrapperPass::CFLSteensAAWrapperPass(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), createBBSelectReg(), createDevirtTriggerFunc(), llvm::createFalkorMarkStridedAccessesPass(), llvm::Pass::createPass(), llvm::PPCTargetMachine::createPassConfig(), llvm::createShadowStackGCLoweringPass(), llvm::createUnpackMachineBundles(), llvm::DemandedBitsWrapperPass::DemandedBitsWrapperPass(), llvm::DependenceAnalysisWrapperPass::DependenceAnalysisWrapperPass(), llvm::DivergenceAnalysis::DivergenceAnalysis(), doCallSiteSplitting(), llvm::DominanceFrontierWrapperPass::DominanceFrontierWrapperPass(), llvm::DominatorTreeWrapperPass::DominatorTreeWrapperPass(), llvm::DummyCGSCCPass::DummyCGSCCPass(), llvm::GVNExpression::Expression::dump(), llvm::CallGraphWrapperPass::dump(), llvm::AliasSetTracker::dump(), eliminateLoadsAcrossLoops(), eliminateTailRecursion(), eliminateUnreachableBlock(), llvm::PassRegistrationListener::enumeratePasses(), llvm::PMTopLevelManager::findAnalysisPassInfo(), formLCSSAOnAllLoops(), llvm::GCModuleInfo::GCModuleInfo(), llvm::GCOVOptions::getDefault(), llvm::AnalysisCallGraphWrapperPassTraits::getGraph(), getInductionVariable(), getLayoutSuccessorProbThreshold(), getPassInfo(), llvm::Pass::getPassName(), llvm::GlobalsAAWrapperPass::GlobalsAAWrapperPass(), llvm::GVNHoistLegacyPass::GVNHoistLegacyPass(), llvm::gvn::GVNLegacyPass::GVNLegacyPass(), llvm::HexagonTargetMachine::HexagonTargetMachine(), INITIALIZE_PASS(), INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_END(), llvm::InstructionCombiningPass::InstructionCombiningPass(), llvm::InstructionSelect::InstructionSelect(), llvm::IntervalPartition::IntervalPartition(), llvm::IRTranslator::IRTranslator(), isDebug(), llvm::DenseMapInfo< VTableSlot >::isEqual(), IsInRanges(), IsPointerOffset(), isSecondInstructionInSequence(), llvm::IVUsersWrapperPass::IVUsersWrapperPass(), llvm::LazyBlockFrequencyInfoPass::LazyBlockFrequencyInfoPass(), llvm::LazyBranchProbabilityInfoPass::LazyBranchProbabilityInfoPass(), llvm::LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass(), 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(), LLVMInitializeHexagonTarget(), LLVMInitializeNVPTXTarget(), LLVMInitializePowerPCTarget(), LLVMInitializeWebAssemblyTarget(), LLVMInitializeX86Target(), llvm::Pass::lookupPassInfo(), llvm::LoopAccessLegacyAnalysis::LoopAccessLegacyAnalysis(), llvm::LoopInfoWrapperPass::LoopInfoWrapperPass(), lowerSubFn(), llvm::MachineBlockFrequencyInfo::MachineBlockFrequencyInfo(), llvm::MachineBranchProbabilityInfo::MachineBranchProbabilityInfo(), llvm::MachineDominanceFrontier::MachineDominanceFrontier(), llvm::MachineDominatorTree::MachineDominatorTree(), llvm::MachineLoopInfo::MachineLoopInfo(), llvm::MachineModuleInfo::MachineModuleInfo(), llvm::MachineOptimizationRemarkEmitterPass::MachineOptimizationRemarkEmitterPass(), llvm::MachineRegionInfoPass::MachineRegionInfoPass(), llvm::MemoryDependenceWrapperPass::MemoryDependenceWrapperPass(), llvm::MemorySSAPrinterLegacyPass::MemorySSAPrinterLegacyPass(), llvm::MemorySSAWrapperPass::MemorySSAWrapperPass(), llvm::ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass(), llvm::objcarc::ObjCARCAAWrapperPass::ObjCARCAAWrapperPass(), llvm::OptimizationRemarkEmitterWrapperPass::OptimizationRemarkEmitterWrapperPass(), optimizeDivRem(), llvm::SymbolRewriter::RewriteMapParser::parse(), parseCond(), llvm::PassNameParser::PassNameParser(), patchAndReplaceAllUsesWith(), llvm::PhysicalRegisterUsageInfo::PhysicalRegisterUsageInfo(), llvm::PostDominatorTreeWrapperPass::PostDominatorTreeWrapperPass(), llvm::PredicateInfoPrinterLegacyPass::PredicateInfoPrinterLegacyPass(), llvm::LazyValueInfo::printLVI(), RedzoneSizeForScale(), llvm::RegionInfoPass::RegionInfoPass(), llvm::RegisterAGBase::RegisterAGBase(), llvm::RegisterPass< passName >::RegisterPass(), llvm::AMDGPULibCalls::replaceCall(), replaceDevirtTrigger(), llvm::BoundsCheckingPass::run(), llvm::DCEPass::run(), llvm::ForceFunctionAttrsPass::run(), llvm::LowerAtomicPass::run(), llvm::PartiallyInlineLibCallsPass::run(), llvm::PromotePass::run(), llvm::SinkingPass::run(), llvm::ArgumentPromotionPass::run(), llvm::InferFunctionAttrsPass::run(), llvm::BDCEPass::run(), llvm::StripDeadPrototypesPass::run(), llvm::LoopRotatePass::run(), llvm::GlobalOptPass::run(), llvm::EliminateAvailableExternallyPass::run(), llvm::IndVarSimplifyPass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::LoopDeletionPass::run(), llvm::AlwaysInlinerPass::run(), llvm::DSEPass::run(), llvm::CalledValuePropagationPass::run(), llvm::LowerExpectIntrinsicPass::run(), llvm::ConstantMergePass::run(), llvm::CFGViewerPass::run(), llvm::IPSCCPPass::run(), llvm::ADCEPass::run(), llvm::SCCPPass::run(), llvm::EarlyCSEPass::run(), llvm::LoopSinkPass::run(), llvm::SimpleLoopUnswitchPass::run(), llvm::SimplifyCFGPass::run(), llvm::PostOrderFunctionAttrsPass::run(), llvm::InternalizePass::run(), llvm::BitcodeWriterPass::run(), llvm::ReassociatePass::run(), runImpl(), runOnFunction(), llvm::ScalarEvolutionWrapperPass::ScalarEvolutionWrapperPass(), llvm::SCEVAAWrapperPass::SCEVAAWrapperPass(), llvm::ScopedNoAliasAAWrapperPass::ScopedNoAliasAAWrapperPass(), llvm::SelectionDAGISel::SelectionDAGISel(), setCannotDuplicate(), llvm::simplifyLoop(), SimplifyLoopInst(), llvm::SlotIndexes::SlotIndexes(), splitGlobals(), llvm::sroa::SROALegacyPass::SROALegacyPass(), llvm::StackProtector::StackProtector(), llvm::TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(), llvm::TargetPassConfig::TargetPassConfig(), llvm::TargetTransformInfoWrapperPass::TargetTransformInfoWrapperPass(), tryToUnrollLoop(), llvm::TypeBasedAAWrapperPass::TypeBasedAAWrapperPass(), llvm::UnifyFunctionExitNodes::UnifyFunctionExitNodes(), llvm::verifyModule(), llvm::DominatorTree::viewGraph(), writeCFGToDotFile(), and llvm::LTOCodeGenerator::~LTOCodeGenerator().

◆ registerAnalysisGroup()

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

References llvm::PassInfo::addInterfaceImplemented(), assert(), llvm::PassInfo::getNormalCtor(), getPassInfo(), llvm::PassInfo::isAnalysisGroup(), registerPass(), and llvm::PassInfo::setNormalCtor().

Referenced by llvm::RegisterAGBase::RegisterAGBase().

◆ registerPass()

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 assert(), llvm::PassInfo::getPassArgument(), llvm::PassInfo::getTypeInfo(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert().

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

◆ removeRegistrationListener()

void PassRegistry::removeRegistrationListener ( PassRegistrationListener L)

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

Definition at line 124 of file PassRegistry.cpp.

References llvm::find(), and I.


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