LLVM 20.0.0git
|
Represent the analysis usage information of a pass. More...
#include "llvm/PassAnalysisSupport.h"
Public Types | |
using | VectorType = SmallVectorImpl< AnalysisID > |
Public Member Functions | |
AnalysisUsage ()=default | |
AnalysisUsage & | addPreserved (StringRef Arg) |
Add the Pass with the specified argument string to the set of analyses preserved by this pass. | |
void | setPreservesAll () |
Set by analyses that do not transform their input at all. | |
bool | getPreservesAll () const |
Determine whether a pass said it does not transform its input at all. | |
void | setPreservesCFG () |
This function should be called by the pass, iff they do not: | |
const VectorType & | getRequiredSet () const |
const VectorType & | getRequiredTransitiveSet () const |
const VectorType & | getPreservedSet () const |
const VectorType & | getUsedSet () const |
AnalysisUsage & | addRequiredID (const void *ID) |
AnalysisUsage & | addRequiredID (char &ID) |
template<class PassClass > | |
AnalysisUsage & | addRequired () |
AnalysisUsage & | addRequiredTransitiveID (char &ID) |
template<class PassClass > | |
AnalysisUsage & | addRequiredTransitive () |
AnalysisUsage & | addPreservedID (const void *ID) |
AnalysisUsage & | addPreservedID (char &ID) |
template<class PassClass > | |
AnalysisUsage & | addPreserved () |
Add the specified Pass class to the set of analyses preserved by this pass. | |
AnalysisUsage & | addUsedIfAvailableID (const void *ID) |
AnalysisUsage & | addUsedIfAvailableID (char &ID) |
template<class PassClass > | |
AnalysisUsage & | addUsedIfAvailable () |
Add the specified Pass class to the set of analyses used by this pass. | |
Represent the analysis usage information of a pass.
This tracks analyses that the pass REQUIRES (must be available when the pass runs), REQUIRES TRANSITIVE (must be available throughout the lifetime of the pass), and analyses that the pass PRESERVES (the pass does not invalidate the results of these analyses). This information is provided by a pass to the Pass infrastructure through the getAnalysisUsage virtual function.
Definition at line 47 of file PassAnalysisSupport.h.
Definition at line 49 of file PassAnalysisSupport.h.
|
default |
|
inline |
Add the specified Pass class to the set of analyses preserved by this pass.
Definition at line 98 of file PassAnalysisSupport.h.
Referenced by llvm::InstructionSelect::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachinePipeliner::getAnalysisUsage(), llvm::ReplaceWithVeclibLegacy::getAnalysisUsage(), llvm::SelectionDAGISelLegacy::getAnalysisUsage(), llvm::StackProtector::getAnalysisUsage(), llvm::InstructionCombiningPass::getAnalysisUsage(), llvm::RAGreedy::getAnalysisUsage(), llvm::AMDGPUAsmPrinter::getAnalysisUsage(), SIAnnotateControlFlowLegacy::getAnalysisUsage(), llvm::MipsDAGToDAGISelLegacy::getAnalysisUsage(), llvm::gvn::GVNLegacyPass::getAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::getLoopAnalysisUsage(), and llvm::getSelectionDAGFallbackAnalysisUsage().
AnalysisUsage & AnalysisUsage::addPreserved | ( | StringRef | Arg | ) |
Add the Pass with the specified argument string to the set of analyses preserved by this pass.
If no such Pass exists, do nothing. This can be useful when a pass is trivially preserved, but may not be linked in. Be careful about spelling!
Definition at line 262 of file Pass.cpp.
References llvm::PassInfo::getTypeInfo(), and llvm::Pass::lookupPassInfo().
|
inline |
Definition at line 92 of file PassAnalysisSupport.h.
|
inline |
Add the specified ID to the set of analyses preserved by this pass.
Definition at line 88 of file PassAnalysisSupport.h.
Referenced by llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), and llvm::getLoopAnalysisUsage().
|
inline |
Definition at line 75 of file PassAnalysisSupport.h.
References addRequiredID().
Referenced by llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::BlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::BranchProbabilityInfoWrapperPass::getAnalysisUsage(), llvm::DominanceFrontierWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsViewerWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsPrinterWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsModuleViewerWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsModulePrinterWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::GlobalsAAWrapperPass::getAnalysisUsage(), llvm::IVUsersWrapperPass::getAnalysisUsage(), llvm::LazyValueInfoWrapperPass::getAnalysisUsage(), llvm::MemoryDependenceWrapperPass::getAnalysisUsage(), llvm::ModuleSummaryIndexWrapperPass::getAnalysisUsage(), llvm::OptimizationRemarkEmitterWrapperPass::getAnalysisUsage(), llvm::RegionInfoPass::getAnalysisUsage(), llvm::SCEVAAWrapperPass::getAnalysisUsage(), llvm::StackSafetyGlobalInfoWrapperPass::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::ExecutionDomainFix::getAnalysisUsage(), llvm::InstructionSelect::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::LoadStoreOpt::getAnalysisUsage(), llvm::Localizer::getAnalysisUsage(), llvm::RegBankSelect::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::MachineBlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachineLoopInfoWrapperPass::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::MachinePipeliner::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::ReplaceWithVeclibLegacy::getAnalysisUsage(), llvm::SelectionDAGISelLegacy::getAnalysisUsage(), llvm::StackProtector::getAnalysisUsage(), llvm::InstructionCombiningPass::getAnalysisUsage(), llvm::BreakFalseDeps::getAnalysisUsage(), llvm::RegAllocScoring::getAnalysisUsage(), llvm::RAGreedy::getAnalysisUsage(), AMDGPUAnnotateUniformValuesLegacy::getAnalysisUsage(), llvm::AMDGPUAsmPrinter::getAnalysisUsage(), llvm::AMDGPUDAGToDAGISelLegacy::getAnalysisUsage(), AMDGPULateCodeGenPrepareLegacy::getAnalysisUsage(), llvm::AMDGPURegBankSelect::getAnalysisUsage(), llvm::AMDGPUResourceUsageAnalysis::getAnalysisUsage(), llvm::GCNRegPressurePrinter::getAnalysisUsage(), SIAnnotateControlFlowLegacy::getAnalysisUsage(), SILowerI1CopiesLegacy::getAnalysisUsage(), llvm::ARMBlockPlacement::getAnalysisUsage(), llvm::MipsSEDAGToDAGISelLegacy::getAnalysisUsage(), llvm::NVPTXAsmPrinter::getAnalysisUsage(), llvm::SPIRVConvergenceRegionAnalysisWrapperPass::getAnalysisUsage(), llvm::SPIRVMergeRegionExitTargets::getAnalysisUsage(), llvm::WebAssemblyExceptionInfo::getAnalysisUsage(), llvm::gvn::GVNLegacyPass::getAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::getLoopAnalysisUsage(), and INITIALIZE_PASS().
AnalysisUsage & AnalysisUsage::addRequiredID | ( | char & | ID | ) |
AnalysisUsage & AnalysisUsage::addRequiredID | ( | const void * | ID | ) |
Add the specified ID to the required set of the usage info for a pass.
Definition at line 270 of file Pass.cpp.
Referenced by addRequired(), and llvm::getLoopAnalysisUsage().
|
inline |
Definition at line 81 of file PassAnalysisSupport.h.
References addRequiredTransitiveID().
Referenced by llvm::DependenceAnalysisWrapperPass::getAnalysisUsage(), llvm::AAResultsWrapperPass::getAnalysisUsage(), llvm::BasicAAWrapperPass::getAnalysisUsage(), llvm::LazyBlockFrequencyInfoPass::getAnalysisUsage(), llvm::LazyBranchProbabilityInfoPass::getAnalysisUsage(), llvm::LoopInfoWrapperPass::getAnalysisUsage(), llvm::MemoryDependenceWrapperPass::getAnalysisUsage(), llvm::MemorySSAWrapperPass::getAnalysisUsage(), llvm::RegionInfoPass::getAnalysisUsage(), llvm::ScalarEvolutionWrapperPass::getAnalysisUsage(), llvm::StackSafetyInfoWrapperPass::getAnalysisUsage(), llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), llvm::LazyBlockFrequencyInfoPass::getLazyBFIAnalysisUsage(), and llvm::LazyBranchProbabilityInfoPass::getLazyBPIAnalysisUsage().
AnalysisUsage & AnalysisUsage::addRequiredTransitiveID | ( | char & | ID | ) |
Definition at line 280 of file Pass.cpp.
Referenced by addRequiredTransitive(), and llvm::LiveIntervalsWrapperPass::getAnalysisUsage().
|
inline |
Add the specified Pass class to the set of analyses used by this pass.
Definition at line 117 of file PassAnalysisSupport.h.
Referenced by llvm::AAResultsWrapperPass::getAnalysisUsage().
|
inline |
Definition at line 111 of file PassAnalysisSupport.h.
|
inline |
Add the specified ID to the set of analyses used by this pass if they are available..
Definition at line 107 of file PassAnalysisSupport.h.
|
inline |
Definition at line 148 of file PassAnalysisSupport.h.
Referenced by llvm::PMDataManager::dumpPreservedSet(), llvm::PMDataManager::preserveHigherLevelAnalysis(), llvm::PMDataManager::removeNotPreservedAnalysis(), and llvm::PMDataManager::verifyPreservedAnalysis().
|
inline |
Determine whether a pass said it does not transform its input at all.
Definition at line 133 of file PassAnalysisSupport.h.
Referenced by llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMDataManager::removeNotPreservedAnalysis().
|
inline |
Definition at line 144 of file PassAnalysisSupport.h.
Referenced by llvm::PMDataManager::collectRequiredAndUsedAnalyses(), llvm::PMDataManager::dumpRequiredSet(), llvm::PMDataManager::initializeAnalysisImpl(), and llvm::PMTopLevelManager::schedulePass().
|
inline |
Definition at line 145 of file PassAnalysisSupport.h.
Referenced by llvm::PMTopLevelManager::setLastUser().
|
inline |
Definition at line 149 of file PassAnalysisSupport.h.
Referenced by llvm::PMDataManager::collectRequiredAndUsedAnalyses(), and llvm::PMDataManager::dumpUsedSet().
|
inline |
Set by analyses that do not transform their input at all.
Definition at line 130 of file PassAnalysisSupport.h.
Referenced by llvm::DependenceAnalysisWrapperPass::getAnalysisUsage(), llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::AAResultsWrapperPass::getAnalysisUsage(), llvm::ExternalAAWrapperPass::getAnalysisUsage(), llvm::BasicAAWrapperPass::getAnalysisUsage(), llvm::BlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::BranchProbabilityInfoWrapperPass::getAnalysisUsage(), llvm::CallGraphWrapperPass::getAnalysisUsage(), llvm::DummyCGSCCPass::getAnalysisUsage(), llvm::DominanceFrontierWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsViewerWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsPrinterWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsModuleViewerWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DOTGraphTraitsModulePrinterWrapperPass< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::DXILMetadataAnalysisWrapperPass::getAnalysisUsage(), llvm::DXILResourceWrapperPass::getAnalysisUsage(), llvm::GlobalsAAWrapperPass::getAnalysisUsage(), llvm::IRSimilarityIdentifierWrapperPass::getAnalysisUsage(), llvm::IVUsersWrapperPass::getAnalysisUsage(), llvm::LazyBlockFrequencyInfoPass::getAnalysisUsage(), llvm::LazyBranchProbabilityInfoPass::getAnalysisUsage(), llvm::LazyValueInfoWrapperPass::getAnalysisUsage(), llvm::LoopInfoWrapperPass::getAnalysisUsage(), llvm::LCSSAVerificationPass::getAnalysisUsage(), llvm::MemoryDependenceWrapperPass::getAnalysisUsage(), llvm::MemorySSAWrapperPass::getAnalysisUsage(), llvm::ModuleSummaryIndexWrapperPass::getAnalysisUsage(), llvm::ImmutableModuleSummaryIndexWrapperPass::getAnalysisUsage(), llvm::OptimizationRemarkEmitterWrapperPass::getAnalysisUsage(), llvm::PhiValuesWrapperPass::getAnalysisUsage(), llvm::PostDominatorTreeWrapperPass::getAnalysisUsage(), llvm::ProfileSummaryInfoWrapperPass::getAnalysisUsage(), llvm::RegionInfoPass::getAnalysisUsage(), llvm::ScalarEvolutionWrapperPass::getAnalysisUsage(), llvm::SCEVAAWrapperPass::getAnalysisUsage(), llvm::ScopedNoAliasAAWrapperPass::getAnalysisUsage(), llvm::StackSafetyInfoWrapperPass::getAnalysisUsage(), llvm::StackSafetyGlobalInfoWrapperPass::getAnalysisUsage(), llvm::TypeBasedAAWrapperPass::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::AssignmentTrackingAnalysis::getAnalysisUsage(), llvm::CFIFixup::getAnalysisUsage(), llvm::ExecutionDomainFix::getAnalysisUsage(), llvm::GISelCSEAnalysisWrapperPass::getAnalysisUsage(), llvm::GISelKnownBitsAnalysis::getAnalysisUsage(), llvm::LoadStoreOpt::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::MachineBlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::MachineBranchProbabilityInfoWrapperPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::MachineDominatorTreeWrapperPass::getAnalysisUsage(), llvm::MachineLoopInfoWrapperPass::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::MachinePostDominatorTreeWrapperPass::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::ReachingDefAnalysis::getAnalysisUsage(), llvm::VirtRegMap::getAnalysisUsage(), llvm::DominatorTreeWrapperPass::getAnalysisUsage(), llvm::BreakFalseDeps::getAnalysisUsage(), llvm::RegAllocScoring::getAnalysisUsage(), llvm::RegAllocEvictionAdvisorAnalysis::getAnalysisUsage(), llvm::RegAllocPriorityAdvisorAnalysis::getAnalysisUsage(), llvm::AMDGPUAAWrapperPass::getAnalysisUsage(), AMDGPUAnnotateUniformValuesLegacy::getAnalysisUsage(), llvm::AMDGPUArgumentUsageInfo::getAnalysisUsage(), AMDGPULateCodeGenPrepareLegacy::getAnalysisUsage(), llvm::AMDGPUResourceUsageAnalysis::getAnalysisUsage(), llvm::GCNRegPressurePrinter::getAnalysisUsage(), llvm::dxil::ShaderFlagsAnalysisWrapper::getAnalysisUsage(), llvm::NVPTXAAWrapperPass::getAnalysisUsage(), llvm::SPIRVConvergenceRegionAnalysisWrapperPass::getAnalysisUsage(), and llvm::WebAssemblyExceptionInfo::getAnalysisUsage().
void AnalysisUsage::setPreservesCFG | ( | ) |
This function should be called by the pass, iff they do not:
This function annotates the AnalysisUsage info object to say that analyses that only depend on the CFG are preserved by this pass.
Definition at line 256 of file Pass.cpp.
Referenced by llvm::LiveIntervalsWrapperPass::getAnalysisUsage(), llvm::ReplaceWithVeclibLegacy::getAnalysisUsage(), llvm::InstructionCombiningPass::getAnalysisUsage(), llvm::RAGreedy::getAnalysisUsage(), and SILowerI1CopiesLegacy::getAnalysisUsage().