LLVM  6.0.0svn
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::PMDataManager Class Referenceabstract

PMDataManager provides the common place to manage the analysis data used by pass managers. More...

#include "llvm/IR/LegacyPassManagers.h"

Inheritance diagram for llvm::PMDataManager:
Inheritance graph
[legend]
Collaboration diagram for llvm::PMDataManager:
Collaboration graph
[legend]

Public Member Functions

 PMDataManager ()
 
virtual ~PMDataManager ()
 
virtual PassgetAsPass ()=0
 
void recordAvailableAnalysis (Pass *P)
 Augment AvailableAnalysis by adding analysis made available by pass P. More...
 
void verifyPreservedAnalysis (Pass *P)
 verifyPreservedAnalysis – Verify analysis presreved by pass P. More...
 
void removeNotPreservedAnalysis (Pass *P)
 Remove Analysis that is not preserved by the pass. More...
 
void removeDeadPasses (Pass *P, StringRef Msg, enum PassDebuggingString)
 Remove dead passes used by P. More...
 
void freePass (Pass *P, StringRef Msg, enum PassDebuggingString)
 Remove P. More...
 
void add (Pass *P, bool ProcessAnalysis=true)
 Add pass P into the PassVector. More...
 
virtual void addLowerLevelRequiredPass (Pass *P, Pass *RequiredPass)
 Add RequiredPass into list of lower level passes required by pass P. More...
 
virtual PassgetOnTheFlyPass (Pass *P, AnalysisID PI, Function &F)
 
void initializeAnalysisInfo ()
 Initialize available analysis information. More...
 
bool preserveHigherLevelAnalysis (Pass *P)
 
void collectRequiredAndUsedAnalyses (SmallVectorImpl< Pass *> &UsedPasses, SmallVectorImpl< AnalysisID > &ReqPassNotAvailable, Pass *P)
 Populate UsedPasses with analysis pass that are used or required by pass P and are available. More...
 
void initializeAnalysisImpl (Pass *P)
 All Required analyses should be available to the pass as it runs! Here we fill in the AnalysisImpls member of the pass so that it can successfully use the getAnalysis() method to retrieve the implementations it needs. More...
 
PassfindAnalysisPass (AnalysisID AID, bool Direction)
 Find the pass that implements Analysis AID. More...
 
PMTopLevelManagergetTopLevelManager ()
 
void setTopLevelManager (PMTopLevelManager *T)
 
unsigned getDepth () const
 
void setDepth (unsigned newDepth)
 
void dumpLastUses (Pass *P, unsigned Offset) const
 
void dumpPassArguments () const
 
void dumpPassInfo (Pass *P, enum PassDebuggingString S1, enum PassDebuggingString S2, StringRef Msg)
 
void dumpRequiredSet (const Pass *P) const
 
void dumpPreservedSet (const Pass *P) const
 
void dumpUsedSet (const Pass *P) const
 
unsigned getNumContainedPasses () const
 
virtual PassManagerType getPassManagerType () const
 
DenseMap< AnalysisID, Pass * > * getAvailableAnalysis ()
 
void populateInheritedAnalysis (PMStack &PMS)
 

Protected Member Functions

bool isPassDebuggingExecutionsOrMore () const
 isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions or higher is specified. More...
 

Protected Attributes

PMTopLevelManagerTPM
 
SmallVector< Pass *, 16 > PassVector
 
DenseMap< AnalysisID, Pass * > * InheritedAnalysis [PMT_Last]
 

Detailed Description

PMDataManager provides the common place to manage the analysis data used by pass managers.

Definition at line 303 of file LegacyPassManagers.h.

Constructor & Destructor Documentation

◆ PMDataManager()

llvm::PMDataManager::PMDataManager ( )
inlineexplicit

Definition at line 305 of file LegacyPassManagers.h.

References llvm::ARM_AM::add, F(), and P.

◆ ~PMDataManager()

PMDataManager::~PMDataManager ( )
virtual

Definition at line 1253 of file LegacyPassManager.cpp.

References P.

Member Function Documentation

◆ add()

void PMDataManager::add ( Pass P,
bool  ProcessAnalysis = true 
)

◆ addLowerLevelRequiredPass()

void PMDataManager::addLowerLevelRequiredPass ( Pass P,
Pass RequiredPass 
)
virtual

Add RequiredPass into list of lower level passes required by pass P.

RequiredPass is run on the fly by Pass Manager when P requests it through getAnalysis interface.

RequiredPass is run on the fly by Pass Manager when P requests it through getAnalysis interface. This should be handled by specific pass manager.

Definition at line 1226 of file LegacyPassManager.cpp.

References llvm::dbgs(), llvm::Pass::getPassName(), and llvm_unreachable.

◆ collectRequiredAndUsedAnalyses()

void PMDataManager::collectRequiredAndUsedAnalyses ( SmallVectorImpl< Pass *> &  UP,
SmallVectorImpl< AnalysisID > &  RP_NotAvail,
Pass P 
)

Populate UsedPasses with analysis pass that are used or required by pass P and are available.

Populate UP with analysis pass that are used or required by pass P and are available.

Populate ReqPassNotAvailable with analysis pass that are required by pass P but are not available.

Populate RP_NotAvail with analysis pass that are required by pass P but are not available.

Definition at line 1043 of file LegacyPassManager.cpp.

References llvm::AnalysisUsage::getRequiredSet(), llvm::AnalysisUsage::getRequiredTransitiveSet(), llvm::AnalysisUsage::getUsedSet(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

◆ dumpLastUses()

void PMDataManager::dumpLastUses ( Pass P,
unsigned  Offset 
) const

◆ dumpPassArguments()

void PMDataManager::dumpPassArguments ( ) const

Definition at line 1119 of file LegacyPassManager.cpp.

References llvm::dbgs(), and P.

◆ dumpPassInfo()

void PMDataManager::dumpPassInfo ( Pass P,
enum PassDebuggingString  S1,
enum PassDebuggingString  S2,
StringRef  Msg 
)

◆ dumpPreservedSet()

void PMDataManager::dumpPreservedSet ( const Pass P) const

◆ dumpRequiredSet()

void PMDataManager::dumpRequiredSet ( const Pass P) const

◆ dumpUsedSet()

void PMDataManager::dumpUsedSet ( const Pass P) const

◆ findAnalysisPass()

Pass * PMDataManager::findAnalysisPass ( AnalysisID  AID,
bool  SearchParent 
)

Find the pass that implements Analysis AID.

If desired pass is not found then return NULL.

Definition at line 1087 of file LegacyPassManager.cpp.

References I, and if().

◆ freePass()

void PMDataManager::freePass ( Pass P,
StringRef  Msg,
enum PassDebuggingString  DBG_STR 
)

◆ getAsPass()

virtual Pass* llvm::PMDataManager::getAsPass ( )
pure virtual

◆ getAvailableAnalysis()

DenseMap<AnalysisID, Pass*>* llvm::PMDataManager::getAvailableAnalysis ( )
inline

Definition at line 394 of file LegacyPassManagers.h.

◆ getDepth()

unsigned llvm::PMDataManager::getDepth ( ) const
inline

Definition at line 373 of file LegacyPassManagers.h.

References llvm::Depth.

Referenced by llvm::PMStack::push(), and llvm::PMTopLevelManager::setLastUser().

◆ getNumContainedPasses()

unsigned llvm::PMDataManager::getNumContainedPasses ( ) const
inline

◆ getOnTheFlyPass()

Pass * PMDataManager::getOnTheFlyPass ( Pass P,
AnalysisID  PI,
Function F 
)
virtual

Definition at line 1248 of file LegacyPassManager.cpp.

References llvm_unreachable.

◆ getPassManagerType()

virtual PassManagerType llvm::PMDataManager::getPassManagerType ( ) const
inlinevirtual

◆ getTopLevelManager()

PMTopLevelManager* llvm::PMDataManager::getTopLevelManager ( )
inline

Definition at line 370 of file LegacyPassManagers.h.

◆ initializeAnalysisImpl()

void PMDataManager::initializeAnalysisImpl ( Pass P)

All Required analyses should be available to the pass as it runs! Here we fill in the AnalysisImpls member of the pass so that it can successfully use the getAnalysis() method to retrieve the implementations it needs.

Definition at line 1070 of file LegacyPassManager.cpp.

References llvm::AnalysisResolver::addAnalysisImplsPair(), assert(), llvm::AnalysisUsage::getRequiredSet(), and llvm::Pass::getResolver().

Referenced by llvm::RGPassManager::runOnFunction(), llvm::LPPassManager::runOnFunction(), and llvm::PMTopLevelManager::schedulePass().

◆ initializeAnalysisInfo()

void llvm::PMDataManager::initializeAnalysisInfo ( )
inline

Initialize available analysis information.

Definition at line 342 of file LegacyPassManagers.h.

References llvm::PMT_Last.

Referenced by llvm::PMStack::pop().

◆ isPassDebuggingExecutionsOrMore()

bool PMDataManager::isPassDebuggingExecutionsOrMore ( ) const
protected

isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions or higher is specified.

Definition at line 127 of file LegacyPassManager.cpp.

Referenced by llvm::RGPassManager::runOnFunction().

◆ populateInheritedAnalysis()

void llvm::PMDataManager::populateInheritedAnalysis ( PMStack PMS)
inline

◆ preserveHigherLevelAnalysis()

bool PMDataManager::preserveHigherLevelAnalysis ( Pass P)

◆ recordAvailableAnalysis()

void PMDataManager::recordAvailableAnalysis ( Pass P)

Augment AvailableAnalysis by adding analysis made available by pass P.

Augement AvailableAnalysis by adding analysis made available by pass P.

Definition at line 817 of file LegacyPassManager.cpp.

References assert(), llvm::PassInfo::getInterfacesImplemented(), llvm::Pass::getPassID(), and P.

Referenced by llvm::RGPassManager::runOnFunction(), llvm::LPPassManager::runOnFunction(), and llvm::PMTopLevelManager::schedulePass().

◆ removeDeadPasses()

void PMDataManager::removeDeadPasses ( Pass P,
StringRef  Msg,
enum PassDebuggingString  DBG_STR 
)

Remove dead passes used by P.

Remove analysis passes that are not used any longer.

Definition at line 916 of file LegacyPassManager.cpp.

References llvm::dbgs(), llvm::SmallVectorBase::empty(), and llvm::Pass::getPassName().

Referenced by llvm::RGPassManager::runOnFunction(), and llvm::LPPassManager::runOnFunction().

◆ removeNotPreservedAnalysis()

void PMDataManager::removeNotPreservedAnalysis ( Pass P)

◆ setDepth()

void llvm::PMDataManager::setDepth ( unsigned  newDepth)
inline

Definition at line 374 of file LegacyPassManagers.h.

References llvm::Depth.

Referenced by llvm::PMStack::push().

◆ setTopLevelManager()

void llvm::PMDataManager::setTopLevelManager ( PMTopLevelManager T)
inline

◆ verifyPreservedAnalysis()

void PMDataManager::verifyPreservedAnalysis ( Pass P)

verifyPreservedAnalysis – Verify analysis presreved by pass P.

verifyPreservedAnalysis – Verify analysis preserved by pass P.

Definition at line 851 of file LegacyPassManager.cpp.

References llvm::getPassTimer(), and llvm::AnalysisUsage::getPreservedSet().

Referenced by llvm::RGPassManager::runOnFunction(), and llvm::LPPassManager::runOnFunction().

Member Data Documentation

◆ InheritedAnalysis

DenseMap<AnalysisID, Pass *>* llvm::PMDataManager::InheritedAnalysis[PMT_Last]
protected

Definition at line 416 of file LegacyPassManagers.h.

◆ PassVector

SmallVector<Pass *, 16> llvm::PMDataManager::PassVector
protected

Definition at line 411 of file LegacyPassManagers.h.

◆ TPM

PMTopLevelManager* llvm::PMDataManager::TPM
protected

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