LLVM 20.0.0git
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).
 
const PassInfogetPassInfo (StringRef Arg) const
 getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' argument string.
 
void registerPass (const PassInfo &PI, bool ShouldFree=false)
 registerPass - Register a pass (by means of its PassInfo) with the registry.
 
void enumerateWith (PassRegistrationListener *L)
 enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's passEnumerate() callback on each of them.
 
void addRegistrationListener (PassRegistrationListener *L)
 addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() callbacks whenever a new pass is registered.
 
void removeRegistrationListener (PassRegistrationListener *L)
 removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives passRegistered() callbacks.
 

Static Public Member Functions

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

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

Constructor & Destructor Documentation

◆ PassRegistry()

llvm::PassRegistry::PassRegistry ( )
default

◆ ~PassRegistry()

PassRegistry::~PassRegistry ( )
default

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

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

◆ getPassInfo() [1/2]

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

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().

Referenced by llvm::Pass::createPass(), llvm::PMTopLevelManager::findAnalysisPassInfo(), getPassInfo(), llvm::Pass::getPassName(), and llvm::Pass::lookupPassInfo().

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

References llvm::StringMap< ValueTy, AllocatorTy >::lookup().

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

Referenced by llvm::AAResultsWrapperPass::AAResultsWrapperPass(), llvm::AMDGPUAAWrapperPass::AMDGPUAAWrapperPass(), llvm::AssumptionCacheTracker::AssumptionCacheTracker(), llvm::BasicAAWrapperPass::BasicAAWrapperPass(), llvm::BasicBlockPathCloning::BasicBlockPathCloning(), llvm::BasicBlockSectionsProfileReaderWrapperPass::BasicBlockSectionsProfileReaderWrapperPass(), llvm::BlockFrequencyInfoWrapperPass::BlockFrequencyInfoWrapperPass(), llvm::BranchProbabilityInfoWrapperPass::BranchProbabilityInfoWrapperPass(), llvm::BreakFalseDeps::BreakFalseDeps(), llvm::CallGraphWrapperPass::CallGraphWrapperPass(), llvm::CFIFixup::CFIFixup(), llvm::Pass::createPass(), llvm::CycleInfoWrapperPass::CycleInfoWrapperPass(), llvm::DependenceAnalysisWrapperPass::DependenceAnalysisWrapperPass(), llvm::DominanceFrontierWrapperPass::DominanceFrontierWrapperPass(), llvm::DominatorTreeWrapperPass::DominatorTreeWrapperPass(), llvm::DummyCGSCCPass::DummyCGSCCPass(), llvm::DXILMetadataAnalysisWrapperPass::DXILMetadataAnalysisWrapperPass(), llvm::DXILResourceWrapperPass::DXILResourceWrapperPass(), llvm::PassRegistrationListener::enumeratePasses(), llvm::ErrataWorkaround::ErrataWorkaround(), llvm::ExternalAAWrapperPass::ExternalAAWrapperPass(), llvm::PMTopLevelManager::findAnalysisPassInfo(), GCEmptyBasicBlocks::GCEmptyBasicBlocks(), llvm::GCModuleInfo::GCModuleInfo(), getPassInfo(), llvm::Pass::getPassName(), llvm::GISelCSEAnalysisWrapperPass::GISelCSEAnalysisWrapperPass(), llvm::GISelKnownBitsAnalysis::GISelKnownBitsAnalysis(), llvm::GlobalsAAWrapperPass::GlobalsAAWrapperPass(), llvm::gvn::GVNLegacyPass::GVNLegacyPass(), llvm::HexagonMask::HexagonMask(), llvm::HexagonTargetMachine::HexagonTargetMachine(), llvm::ImmutableModuleSummaryIndexWrapperPass::ImmutableModuleSummaryIndexWrapperPass(), INITIALIZE_PASS(), llvm::InstructionCombiningPass::InstructionCombiningPass(), llvm::IVUsersWrapperPass::IVUsersWrapperPass(), llvm::LazyBlockFrequencyInfoPass::LazyBlockFrequencyInfoPass(), llvm::LazyBranchProbabilityInfoPass::LazyBranchProbabilityInfoPass(), llvm::LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass(), llvm::LazyValueInfoWrapperPass::LazyValueInfoWrapperPass(), llvm::LCSSAVerificationPass::LCSSAVerificationPass(), llvm::LiveDebugVariables::LiveDebugVariables(), llvm::LiveIntervalsWrapperPass::LiveIntervalsWrapperPass(), llvm::LiveStacks::LiveStacks(), llvm::LiveVariablesWrapperPass::LiveVariablesWrapperPass(), LLVMInitializeAArch64Target(), LLVMInitializeAMDGPUTarget(), LLVMInitializeARCTarget(), LLVMInitializeARMTarget(), llvm::LLVMInitializeAVRTarget(), LLVMInitializeBPFTarget(), LLVMInitializeCSKYTarget(), LLVMInitializeDirectXTarget(), LLVMInitializeHexagonTarget(), LLVMInitializeLanaiTarget(), LLVMInitializeLoongArchTarget(), LLVMInitializeM68kTarget(), LLVMInitializeMipsTarget(), LLVMInitializeMSP430Target(), LLVMInitializeNVPTXTarget(), LLVMInitializePowerPCTarget(), LLVMInitializeRISCVTarget(), LLVMInitializeSparcTarget(), LLVMInitializeSPIRVTarget(), LLVMInitializeSystemZTarget(), LLVMInitializeVETarget(), LLVMInitializeWebAssemblyTarget(), LLVMInitializeX86Target(), LLVMInitializeXCoreTarget(), llvm::Pass::lookupPassInfo(), llvm::LoopInfoWrapperPass::LoopInfoWrapperPass(), llvm::MachineBlockFrequencyInfoWrapperPass::MachineBlockFrequencyInfoWrapperPass(), llvm::MachineBranchProbabilityInfoWrapperPass::MachineBranchProbabilityInfoWrapperPass(), llvm::MachineCycleInfoWrapperPass::MachineCycleInfoWrapperPass(), llvm::MachineDominanceFrontier::MachineDominanceFrontier(), llvm::MachineLoopInfoWrapperPass::MachineLoopInfoWrapperPass(), llvm::MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(), llvm::MachineOptimizationRemarkEmitterPass::MachineOptimizationRemarkEmitterPass(), llvm::MachinePipeliner::MachinePipeliner(), llvm::MachineRegionInfoPass::MachineRegionInfoPass(), llvm::MachineUniformityAnalysisPass::MachineUniformityAnalysisPass(), llvm::MemoryDependenceWrapperPass::MemoryDependenceWrapperPass(), llvm::MemorySSAWrapperPass::MemorySSAWrapperPass(), llvm::ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass(), llvm::NVPTXAAWrapperPass::NVPTXAAWrapperPass(), llvm::OptimizationRemarkEmitterWrapperPass::OptimizationRemarkEmitterWrapperPass(), llvm::PassNameParser::PassNameParser(), llvm::PhiValuesWrapperPass::PhiValuesWrapperPass(), llvm::PhysicalRegisterUsageInfo::PhysicalRegisterUsageInfo(), llvm::PostDominatorTreeWrapperPass::PostDominatorTreeWrapperPass(), llvm::ReachingDefAnalysis::ReachingDefAnalysis(), llvm::RegAllocScoring::RegAllocScoring(), llvm::RegionInfoPass::RegionInfoPass(), llvm::RegisterPass< passName >::RegisterPass(), llvm::ReplaceWithVeclibLegacy::ReplaceWithVeclibLegacy(), llvm::ScalarEvolutionWrapperPass::ScalarEvolutionWrapperPass(), llvm::SCEVAAWrapperPass::SCEVAAWrapperPass(), llvm::ScopedNoAliasAAWrapperPass::ScopedNoAliasAAWrapperPass(), llvm::SelectionDAGISel::SelectionDAGISel(), llvm::SelectionDAGISelLegacy::SelectionDAGISelLegacy(), SILowerI1CopiesLegacy::SILowerI1CopiesLegacy(), llvm::SlotIndexesWrapperPass::SlotIndexesWrapperPass(), llvm::SPIRVMergeRegionExitTargets::SPIRVMergeRegionExitTargets(), SPIRVStripConvergentIntrinsics::SPIRVStripConvergentIntrinsics(), llvm::StackProtector::StackProtector(), llvm::StackSafetyGlobalInfoWrapperPass::StackSafetyGlobalInfoWrapperPass(), llvm::StackSafetyInfoWrapperPass::StackSafetyInfoWrapperPass(), llvm::TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(), llvm::TargetPassConfig::TargetPassConfig(), llvm::TargetTransformInfoWrapperPass::TargetTransformInfoWrapperPass(), llvm::TypeBasedAAWrapperPass::TypeBasedAAWrapperPass(), llvm::UniformityInfoWrapperPass::UniformityInfoWrapperPass(), and llvm::WebAssemblyExceptionInfo::WebAssemblyExceptionInfo().

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

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

Referenced by 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 76 of file PassRegistry.cpp.

References llvm::find(), and I.


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