LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::AnalysisUsage Class Reference

Represent the analysis usage information of a pass. More...

#include "llvm/PassAnalysisSupport.h"

Public Types

typedef SmallVectorImpl< AnalysisIDVectorType
 

Public Member Functions

 AnalysisUsage ()
 
AnalysisUsageaddPreserved (StringRef Arg)
 Add the Pass with the specified argument string to the set of analyses preserved by this pass. More...
 
void setPreservesAll ()
 Set by analyses that do not transform their input at all. More...
 
bool getPreservesAll () const
 Determine whether a pass said it does not transform its input at all. More...
 
void setPreservesCFG ()
 This function should be called by the pass, iff they do not: More...
 
const VectorTypegetRequiredSet () const
 
const VectorTypegetRequiredTransitiveSet () const
 
const VectorTypegetPreservedSet () const
 
const VectorTypegetUsedSet () const
 
AnalysisUsageaddRequiredID (const void *ID)
 
AnalysisUsageaddRequiredID (char &ID)
 
template<class PassClass >
AnalysisUsageaddRequired ()
 
AnalysisUsageaddRequiredTransitiveID (char &ID)
 
template<class PassClass >
AnalysisUsageaddRequiredTransitive ()
 
AnalysisUsageaddPreservedID (const void *ID)
 
AnalysisUsageaddPreservedID (char &ID)
 
template<class PassClass >
AnalysisUsageaddPreserved ()
 Add the specified Pass class to the set of analyses preserved by this pass. More...
 
AnalysisUsageaddUsedIfAvailableID (const void *ID)
 
AnalysisUsageaddUsedIfAvailableID (char &ID)
 
template<class PassClass >
AnalysisUsageaddUsedIfAvailable ()
 Add the specified Pass class to the set of analyses used by this pass. More...
 

Detailed Description

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

Member Typedef Documentation

◆ VectorType

Definition at line 39 of file PassAnalysisSupport.h.

Constructor & Destructor Documentation

◆ AnalysisUsage()

llvm::AnalysisUsage::AnalysisUsage ( )
inline

Definition at line 53 of file PassAnalysisSupport.h.

References addRequiredID().

Member Function Documentation

◆ addPreserved() [1/2]

template<class PassClass >
AnalysisUsage& llvm::AnalysisUsage::addPreserved ( )
inline

Add the specified Pass class to the set of analyses preserved by this pass.

Definition at line 83 of file PassAnalysisSupport.h.

References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by llvm::addStringMetadataToLoop(), addUsedIfAvailable(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::createAArch64ConditionalCompares(), llvm::createAArch64ConditionOptimizerPass(), llvm::createGreedyRegisterAllocator(), createMissedAnalysis(), llvm::createPrologEpilogInserterPass(), llvm::MachineModuleInfo::deleteMachineFunctionFor(), llvm::GVNExpression::Expression::dump(), eliminateTailRecursion(), eliminateUnreachableBlock(), formLCSSAOnAllLoops(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::InstructionCombiningPass::getAnalysisUsage(), llvm::SelectionDAGISel::getAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::StackProtector::getAnalysisUsage(), llvm::LiveIntervals::getAnalysisUsage(), llvm::GVNHoistLegacyPass::getAnalysisUsage(), llvm::gvn::GVNLegacyPass::getAnalysisUsage(), llvm::sroa::SROALegacyPass::getAnalysisUsage(), llvm::getLoopAnalysisUsage(), INITIALIZE_PASS_BEGIN(), llvm::CoalescerPair::isCoalescable(), isDebug(), isImplicitlyDef(), IsPointerOffset(), patchAndReplaceAllUsesWith(), false::LibCallsShrinkWrap::perform(), llvm::SinkingPass::run(), llvm::BDCEPass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::DSEPass::run(), llvm::SCCPPass::run(), llvm::ADCEPass::run(), llvm::UnreachableBlockElimPass::run(), llvm::EarlyCSEPass::run(), llvm::SimplifyCFGPass::run(), llvm::ReassociatePass::run(), llvm::InternalizePass::run(), runImpl(), llvm::simplifyLoop(), and llvm::AntiDepBreaker::~AntiDepBreaker().

◆ addPreserved() [2/2]

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 284 of file Pass.cpp.

References llvm::PassInfo::getTypeInfo(), and llvm::Pass::lookupPassInfo().

◆ addPreservedID() [1/2]

AnalysisUsage& llvm::AnalysisUsage::addPreservedID ( const void *  ID)
inline

◆ addPreservedID() [2/2]

AnalysisUsage& llvm::AnalysisUsage::addPreservedID ( char ID)
inline

◆ addRequired()

template<class PassClass >
AnalysisUsage& llvm::AnalysisUsage::addRequired ( )
inline

Definition at line 60 of file PassAnalysisSupport.h.

References addRequiredID(), and addRequiredTransitiveID().

Referenced by llvm::addStringMetadataToLoop(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::createAArch64ConditionalCompares(), llvm::createAArch64ConditionOptimizerPass(), llvm::createDwarfEHPass(), llvm::createFalkorMarkStridedAccessesPass(), llvm::createFunctionInliningPass(), llvm::createGCInfoPrinter(), llvm::createGreedyRegisterAllocator(), createMissedAnalysis(), llvm::createObjCARCOptPass(), llvm::createPrologEpilogInserterPass(), llvm::createRegUsageInfoCollector(), llvm::createRegUsageInfoPropPass(), llvm::createSystemZLDCleanupPass(), llvm::createX86GlobalBaseRegPass(), llvm::MachineModuleInfo::deleteMachineFunctionFor(), llvm::AliasSetTracker::dump(), eliminateTailRecursion(), formLCSSAOnAllLoops(), llvm::getAAResultsAnalysisUsage(), llvm::DivergenceAnalysis::getAnalysisUsage(), llvm::InstructionSelect::getAnalysisUsage(), llvm::LegacyInlinerBase::getAnalysisUsage(), llvm::MachineBlockFrequencyInfo::getAnalysisUsage(), llvm::Legalizer::getAnalysisUsage(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::InstructionCombiningPass::getAnalysisUsage(), llvm::SCEVAAWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::ModuleSummaryIndexWrapperPass::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::SelectionDAGISel::getAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::DemandedBitsWrapperPass::getAnalysisUsage(), llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::LazyBranchProbabilityInfoPass::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::RGPassManager::getAnalysisUsage(), llvm::LPPassManager::getAnalysisUsage(), llvm::CFLAndersAAWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsPrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::LazyBlockFrequencyInfoPass::getAnalysisUsage(), llvm::StackProtector::getAnalysisUsage(), llvm::CFLSteensAAWrapperPass::getAnalysisUsage(), llvm::MachineLoopInfo::getAnalysisUsage(), llvm::BlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsModuleViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::GlobalsAAWrapperPass::getAnalysisUsage(), llvm::LazyValueInfoWrapperPass::getAnalysisUsage(), llvm::DominanceFrontierWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsModulePrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::IVUsersWrapperPass::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::BasicAAWrapperPass::getAnalysisUsage(), llvm::BranchProbabilityInfoWrapperPass::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::PredicateInfoPrinterLegacyPass::getAnalysisUsage(), llvm::LiveIntervals::getAnalysisUsage(), llvm::NVPTXAsmPrinter::getAnalysisUsage(), llvm::AAEvalLegacyPass::getAnalysisUsage(), llvm::IRTranslator::getAnalysisUsage(), llvm::MemoryDependenceWrapperPass::getAnalysisUsage(), llvm::RegBankSelect::getAnalysisUsage(), llvm::LoopAccessLegacyAnalysis::getAnalysisUsage(), llvm::MemorySSAPrinterLegacyPass::getAnalysisUsage(), llvm::LoopInfoWrapperPass::getAnalysisUsage(), llvm::RegionInfoPass::getAnalysisUsage(), llvm::AAResultsWrapperPass::getAnalysisUsage(), llvm::GVNHoistLegacyPass::getAnalysisUsage(), llvm::gvn::GVNLegacyPass::getAnalysisUsage(), llvm::sroa::SROALegacyPass::getAnalysisUsage(), getLayoutSuccessorProbThreshold(), llvm::LazyBlockFrequencyInfoPass::getLazyBFIAnalysisUsage(), llvm::LazyBranchProbabilityInfoPass::getLazyBPIAnalysisUsage(), llvm::getLoopAnalysisUsage(), INITIALIZE_PASS(), INITIALIZE_PASS_BEGIN(), llvm::CoalescerPair::isCoalescable(), isDebug(), llvm::DenseMapInfo< VTableSlot >::isEqual(), isImplicitlyDef(), IsPointerOffset(), patchAndReplaceAllUsesWith(), false::LibCallsShrinkWrap::perform(), llvm::LazyValueInfo::printLVI(), replaceDevirtTrigger(), llvm::PromotePass::run(), llvm::ArgumentPromotionPass::run(), llvm::PartiallyInlineLibCallsPass::run(), llvm::SinkingPass::run(), llvm::InferFunctionAttrsPass::run(), llvm::LoopRotatePass::run(), llvm::BDCEPass::run(), llvm::GlobalOptPass::run(), llvm::DSEPass::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::BitcodeWriterPass::run(), runImpl(), llvm::simplifyLoop(), SimplifyLoopInst(), tryToUnrollLoop(), and llvm::AntiDepBreaker::~AntiDepBreaker().

◆ addRequiredID() [1/2]

AnalysisUsage & AnalysisUsage::addRequiredID ( const void *  ID)

Add the specified ID to the required set of the usage info for a pass.

Definition at line 291 of file Pass.cpp.

References llvm::cl::Required.

Referenced by addRequired(), llvm::addStringMetadataToLoop(), AnalysisUsage(), llvm::getLoopAnalysisUsage(), and INITIALIZE_PASS().

◆ addRequiredID() [2/2]

AnalysisUsage & AnalysisUsage::addRequiredID ( char ID)

Definition at line 296 of file Pass.cpp.

References llvm::cl::Required.

◆ addRequiredTransitive()

template<class PassClass >
AnalysisUsage& llvm::AnalysisUsage::addRequiredTransitive ( )
inline

◆ addRequiredTransitiveID()

AnalysisUsage & AnalysisUsage::addRequiredTransitiveID ( char ID)

◆ addUsedIfAvailable()

template<class PassClass >
AnalysisUsage& llvm::AnalysisUsage::addUsedIfAvailable ( )
inline

Add the specified Pass class to the set of analyses used by this pass.

Definition at line 102 of file PassAnalysisSupport.h.

References addPreserved(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by llvm::getAAResultsAnalysisUsage(), and llvm::AAResultsWrapperPass::getAnalysisUsage().

◆ addUsedIfAvailableID() [1/2]

AnalysisUsage& llvm::AnalysisUsage::addUsedIfAvailableID ( const void *  ID)
inline

Add the specified ID to the set of analyses used by this pass if they are available..

Definition at line 92 of file PassAnalysisSupport.h.

References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

◆ addUsedIfAvailableID() [2/2]

AnalysisUsage& llvm::AnalysisUsage::addUsedIfAvailableID ( char ID)
inline

◆ getPreservedSet()

const VectorType& llvm::AnalysisUsage::getPreservedSet ( ) const
inline

◆ getPreservesAll()

bool llvm::AnalysisUsage::getPreservesAll ( ) const
inline

Determine whether a pass said it does not transform its input at all.

Definition at line 118 of file PassAnalysisSupport.h.

References setPreservesCFG().

Referenced by llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMDataManager::removeNotPreservedAnalysis().

◆ getRequiredSet()

const VectorType& llvm::AnalysisUsage::getRequiredSet ( ) const
inline

◆ getRequiredTransitiveSet()

const VectorType& llvm::AnalysisUsage::getRequiredTransitiveSet ( ) const
inline

◆ getUsedSet()

const VectorType& llvm::AnalysisUsage::getUsedSet ( ) const
inline

◆ setPreservesAll()

void llvm::AnalysisUsage::setPreservesAll ( )
inline

Set by analyses that do not transform their input at all.

Definition at line 115 of file PassAnalysisSupport.h.

Referenced by llvm::createCostModelAnalysisPass(), llvm::createGCInfoPrinter(), llvm::createRegUsageInfoCollector(), llvm::createRegUsageInfoPropPass(), llvm::CallGraphWrapperPass::dump(), llvm::AliasSetTracker::dump(), llvm::RGPassManager::dumpPassStructure(), llvm::DivergenceAnalysis::getAnalysisUsage(), llvm::PhysicalRegisterUsageInfo::getAnalysisUsage(), llvm::MachineBranchProbabilityInfo::getAnalysisUsage(), llvm::MachineBlockFrequencyInfo::getAnalysisUsage(), llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::ModuleSummaryIndexWrapperPass::getAnalysisUsage(), llvm::SCEVAAWrapperPass::getAnalysisUsage(), llvm::LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(), llvm::PostDominatorTreeWrapperPass::getAnalysisUsage(), llvm::ScopedNoAliasAAWrapperPass::getAnalysisUsage(), llvm::VirtRegMap::getAnalysisUsage(), llvm::TypeBasedAAWrapperPass::getAnalysisUsage(), SafepointIRVerifier::getAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::MachinePostDominatorTree::getAnalysisUsage(), llvm::DemandedBitsWrapperPass::getAnalysisUsage(), llvm::IntervalPartition::getAnalysisUsage(), llvm::MachineTraceMetrics::getAnalysisUsage(), llvm::objcarc::ObjCARCAAWrapperPass::getAnalysisUsage(), llvm::LazyBranchProbabilityInfoPass::getAnalysisUsage(), llvm::AMDGPUAAWrapperPass::getAnalysisUsage(), llvm::MachineRegionInfoPass::getAnalysisUsage(), llvm::MachineDominanceFrontier::getAnalysisUsage(), llvm::RGPassManager::getAnalysisUsage(), llvm::LPPassManager::getAnalysisUsage(), llvm::CFLAndersAAWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsPrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::LazyBlockFrequencyInfoPass::getAnalysisUsage(), llvm::ProfileSummaryInfoWrapperPass::getAnalysisUsage(), llvm::DummyCGSCCPass::getAnalysisUsage(), llvm::CFLSteensAAWrapperPass::getAnalysisUsage(), llvm::OptimizationRemarkEmitterWrapperPass::getAnalysisUsage(), llvm::MachineLoopInfo::getAnalysisUsage(), llvm::BlockFrequencyInfoWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsModuleViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::GlobalsAAWrapperPass::getAnalysisUsage(), llvm::LazyValueInfoWrapperPass::getAnalysisUsage(), llvm::LCSSAVerificationPass::getAnalysisUsage(), llvm::DominanceFrontierWrapperPass::getAnalysisUsage(), llvm::DOTGraphTraitsModulePrinter< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::getAnalysisUsage(), llvm::IVUsersWrapperPass::getAnalysisUsage(), llvm::ExecutionDepsFix::getAnalysisUsage(), llvm::MachineOptimizationRemarkEmitterPass::getAnalysisUsage(), llvm::BasicAAWrapperPass::getAnalysisUsage(), llvm::BranchProbabilityInfoWrapperPass::getAnalysisUsage(), llvm::AsmPrinter::getAnalysisUsage(), llvm::legacy::FunctionPassManagerImpl::getAnalysisUsage(), llvm::PredicateInfoPrinterLegacyPass::getAnalysisUsage(), llvm::DominatorTreeWrapperPass::getAnalysisUsage(), llvm::AAEvalLegacyPass::getAnalysisUsage(), llvm::CallGraphWrapperPass::getAnalysisUsage(), llvm::legacy::PassManagerImpl::getAnalysisUsage(), llvm::FPPassManager::getAnalysisUsage(), llvm::MemoryDependenceWrapperPass::getAnalysisUsage(), llvm::LoopAccessLegacyAnalysis::getAnalysisUsage(), llvm::MemorySSAPrinterLegacyPass::getAnalysisUsage(), llvm::MemorySSAWrapperPass::getAnalysisUsage(), llvm::LoopInfoWrapperPass::getAnalysisUsage(), llvm::DependenceAnalysisWrapperPass::getAnalysisUsage(), llvm::RegionInfoPass::getAnalysisUsage(), llvm::AAResultsWrapperPass::getAnalysisUsage(), llvm::ScalarEvolutionWrapperPass::getAnalysisUsage(), llvm::legacy::FunctionPassManagerImpl::getContainedManager(), getLayoutSuccessorProbThreshold(), INITIALIZE_PASS(), llvm::LiveRegMatrix::LiveRegMatrix(), lowerSubFn(), llvm::PassManagerPrettyStackEntry::print(), llvm::LazyValueInfo::printLVI(), llvm::CFGViewerPass::run(), llvm::BitcodeWriterPass::run(), llvm::PrintFunctionPass::run(), llvm::verifyModule(), writeCFGToDotFile(), and llvm::AAResults::Concept::~Concept().

◆ setPreservesCFG()

void AnalysisUsage::setPreservesCFG ( )

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