LLVM 22.0.0git
|
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 | |
LLVM_ABI | ~PassRegistry () |
LLVM_ABI const PassInfo * | getPassInfo (const void *TI) const |
getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' type identifier (&MyPass::ID). | |
LLVM_ABI const PassInfo * | getPassInfo (StringRef Arg) const |
getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' argument string. | |
LLVM_ABI void | registerPass (const PassInfo &PI, bool ShouldFree=false) |
registerPass - Register a pass (by means of its PassInfo) with the registry. | |
LLVM_ABI void | enumerateWith (PassRegistrationListener *L) |
enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's passEnumerate() callback on each of them. | |
LLVM_ABI void | addRegistrationListener (PassRegistrationListener *L) |
addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() callbacks whenever a new pass is registered. | |
LLVM_ABI void | removeRegistrationListener (PassRegistrationListener *L) |
removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives passRegistered() callbacks. | |
Static Public Member Functions | |
static LLVM_ABI PassRegistry * | getPassRegistry () |
getPassRegistry - Access the global registry object, which is automatically initialized at application launch and destroyed by llvm_shutdown. | |
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 38 of file PassRegistry.h.
|
default |
|
default |
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.
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.
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::PMTopLevelManager::findAnalysisPassInfo(), and getPassInfo().
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().
|
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::BasicBlockPathCloning::BasicBlockPathCloning(), llvm::BasicBlockSectionsProfileReaderWrapperPass::BasicBlockSectionsProfileReaderWrapperPass(), llvm::BreakFalseDeps::BreakFalseDeps(), llvm::CFIFixup::CFIFixup(), llvm::DominatorTreeWrapperPass::DominatorTreeWrapperPass(), llvm::DummyCGSCCPass::DummyCGSCCPass(), llvm::ErrataWorkaround::ErrataWorkaround(), llvm::PMTopLevelManager::findAnalysisPassInfo(), GCEmptyBasicBlocks::GCEmptyBasicBlocks(), llvm::GCModuleInfo::GCModuleInfo(), getPassInfo(), llvm::GISelCSEAnalysisWrapperPass::GISelCSEAnalysisWrapperPass(), llvm::gvn::GVNLegacyPass::GVNLegacyPass(), INITIALIZE_PASS(), llvm::InstructionCombiningPass::InstructionCombiningPass(), llvm::LazyBranchProbabilityInfoPass::LazyBranchProbabilityInfoPass(), llvm::LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass(), llvm::LiveDebugVariablesWrapperLegacy::LiveDebugVariablesWrapperLegacy(), llvm::LiveIntervalsWrapperPass::LiveIntervalsWrapperPass(), llvm::LiveStacksWrapperLegacy::LiveStacksWrapperLegacy(), 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(), LLVMInitializeXtensaTarget(), 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::PhysicalRegisterUsageInfoWrapperLegacy::PhysicalRegisterUsageInfoWrapperLegacy(), llvm::ReachingDefAnalysis::ReachingDefAnalysis(), llvm::RegAllocScoring::RegAllocScoring(), llvm::RegisterPass< passName >::RegisterPass(), RemoveLoadsIntoFakeUsesLegacy::RemoveLoadsIntoFakeUsesLegacy(), llvm::SelectionDAGISel::SelectionDAGISel(), llvm::SelectionDAGISelLegacy::SelectionDAGISelLegacy(), SILowerI1CopiesLegacy::SILowerI1CopiesLegacy(), llvm::SlotIndexesWrapperPass::SlotIndexesWrapperPass(), llvm::StackProtector::StackProtector(), StaticDataAnnotator::StaticDataAnnotator(), StaticDataSplitter::StaticDataSplitter(), and llvm::TargetPassConfig::TargetPassConfig().
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().
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.