LLVM API Documentation

Public Member Functions | Protected Member Functions | Protected Attributes
llvm::PMDataManager Class Reference

#include <LegacyPassManagers.h>

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

List of all members.

Public Member Functions

 PMDataManager ()
virtual ~PMDataManager ()
virtual PassgetAsPass ()=0
void recordAvailableAnalysis (Pass *P)
 Augment AvailableAnalysis by adding analysis made available by pass P.
void verifyPreservedAnalysis (Pass *P)
 verifyPreservedAnalysis -- Verify analysis presreved by pass P.
void removeNotPreservedAnalysis (Pass *P)
 Remove Analysis that is not preserved by the pass.
void removeDeadPasses (Pass *P, StringRef Msg, enum PassDebuggingString)
 Remove dead passes used by P.
void freePass (Pass *P, StringRef Msg, enum PassDebuggingString)
 Remove P.
void add (Pass *P, bool ProcessAnalysis=true)
virtual void addLowerLevelRequiredPass (Pass *P, Pass *RequiredPass)
virtual PassgetOnTheFlyPass (Pass *P, AnalysisID PI, Function &F)
void initializeAnalysisInfo ()
 Initialize available analysis information.
bool preserveHigherLevelAnalysis (Pass *P)
void collectRequiredAnalysis (SmallVectorImpl< Pass * > &RequiredPasses, SmallVectorImpl< AnalysisID > &ReqPassNotAvailable, Pass *P)
void initializeAnalysisImpl (Pass *P)
PassfindAnalysisPass (AnalysisID AID, bool Direction)
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
unsigned getNumContainedPasses () const
virtual PassManagerType getPassManagerType () const
DenseMap< AnalysisID, Pass * > * getAvailableAnalysis ()
void populateInheritedAnalysis (PMStack &PMS)

Protected Member Functions

bool isPassDebuggingExecutionsOrMore () const

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 263 of file LegacyPassManagers.h.


Constructor & Destructor Documentation

llvm::PMDataManager::PMDataManager ( ) [inline, explicit]

Definition at line 266 of file LegacyPassManagers.h.

References initializeAnalysisInfo().


Member Function Documentation

void PMDataManager::add ( Pass P,
bool  ProcessAnalysis = true 
)
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.

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. This should be handled by specific pass manager.

Definition at line 1243 of file LegacyPassManager.cpp.

References llvm::dbgs(), llvm::PMTopLevelManager::dumpArguments(), llvm::PMTopLevelManager::dumpPasses(), llvm::Pass::getPassName(), llvm_unreachable, and TPM.

Referenced by add().

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

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

Definition at line 1064 of file LegacyPassManager.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), findAnalysisPass(), llvm::PMTopLevelManager::findAnalysisUsage(), llvm::AnalysisUsage::getRequiredSet(), llvm::AnalysisUsage::getRequiredTransitiveSet(), I, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and TPM.

Referenced by add().

void PMDataManager::dumpLastUses ( Pass P,
unsigned  Offset 
) const
void PMDataManager::dumpPassInfo ( Pass P,
enum PassDebuggingString  S1,
enum PassDebuggingString  S2,
StringRef  Msg 
)
Pass * PMDataManager::findAnalysisPass ( AnalysisID  AID,
bool  SearchParent 
)
void PMDataManager::freePass ( Pass P,
StringRef  Msg,
enum PassDebuggingString  DBG_STR 
)
virtual Pass* llvm::PMDataManager::getAsPass ( ) [pure virtual]

Definition at line 355 of file LegacyPassManagers.h.

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

Definition at line 1265 of file LegacyPassManager.cpp.

References llvm_unreachable.

Referenced by llvm::AnalysisResolver::findImplPass().

virtual PassManagerType llvm::PMDataManager::getPassManagerType ( ) const [inline, virtual]

Definition at line 332 of file LegacyPassManagers.h.

References TPM.

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 1092 of file LegacyPassManager.cpp.

References llvm::AnalysisResolver::addAnalysisImplsPair(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), findAnalysisPass(), llvm::PMTopLevelManager::findAnalysisUsage(), llvm::AnalysisUsage::getRequiredSet(), llvm::Pass::getResolver(), I, and TPM.

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

Initialize available analysis information.

Definition at line 303 of file LegacyPassManagers.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::clear(), InheritedAnalysis, and llvm::PMT_Last.

Referenced by PMDataManager(), and llvm::PMStack::pop().

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

Definition at line 115 of file LegacyPassManager.cpp.

References PassDebugging.

void PMDataManager::removeDeadPasses ( Pass P,
StringRef  Msg,
enum PassDebuggingString  DBG_STR 
)
void llvm::PMDataManager::setDepth ( unsigned  newDepth) [inline]

Definition at line 336 of file LegacyPassManagers.h.

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


Member Data Documentation


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