LLVM  14.0.0git
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
llvm::PMTopLevelManager Class Referenceabstract

PMTopLevelManager manages LastUser info and collects common APIs used by top level pass managers. More...

#include "llvm/IR/LegacyPassManagers.h"

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

Public Member Functions

void schedulePass (Pass *P)
 Schedule pass P for execution. More...
 
void setLastUser (ArrayRef< Pass * > AnalysisPasses, Pass *P)
 Set pass P as the last user of the given analysis passes. More...
 
void collectLastUses (SmallVectorImpl< Pass * > &LastUses, Pass *P)
 Collect passes whose last user is P. More...
 
PassfindAnalysisPass (AnalysisID AID)
 Find the pass that implements Analysis AID. More...
 
const PassInfofindAnalysisPassInfo (AnalysisID AID) const
 Retrieve the PassInfo for an analysis. More...
 
AnalysisUsagefindAnalysisUsage (Pass *P)
 Find analysis usage information for the pass P. More...
 
virtual ~PMTopLevelManager ()
 Destructor. More...
 
void addImmutablePass (ImmutablePass *P)
 Add immutable pass and initialize it. More...
 
SmallVectorImpl< ImmutablePass * > & getImmutablePasses ()
 
void addPassManager (PMDataManager *Manager)
 
void addIndirectPassManager (PMDataManager *Manager)
 
void dumpPasses () const
 
void dumpArguments () const
 

Public Attributes

PMStack activeStack
 

Protected Member Functions

 PMTopLevelManager (PMDataManager *PMDM)
 Initialize top level manager. Create first pass manager. More...
 
unsigned getNumContainedManagers () const
 
void initializeAllAnalysisInfo ()
 

Protected Attributes

SmallVector< PMDataManager *, 8 > PassManagers
 Collection of pass managers. More...
 

Detailed Description

PMTopLevelManager manages LastUser info and collects common APIs used by top level pass managers.

Definition at line 159 of file LegacyPassManagers.h.

Constructor & Destructor Documentation

◆ PMTopLevelManager()

PMTopLevelManager::PMTopLevelManager ( PMDataManager PMDM)
explicitprotected

Initialize top level manager. Create first pass manager.

Definition at line 558 of file LegacyPassManager.cpp.

References activeStack, addPassManager(), llvm::PMStack::push(), and llvm::PMDataManager::setTopLevelManager().

◆ ~PMTopLevelManager()

PMTopLevelManager::~PMTopLevelManager ( )
virtual

Destructor.

Definition at line 866 of file LegacyPassManager.cpp.

References P, and PassManagers.

Member Function Documentation

◆ addImmutablePass()

void PMTopLevelManager::addImmutablePass ( ImmutablePass P)

Add immutable pass and initialize it.

Definition at line 802 of file LegacyPassManager.cpp.

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

Referenced by schedulePass().

◆ addIndirectPassManager()

void llvm::PMTopLevelManager::addIndirectPassManager ( PMDataManager Manager)
inline

◆ addPassManager()

void llvm::PMTopLevelManager::addPassManager ( PMDataManager Manager)
inline

Definition at line 205 of file LegacyPassManagers.h.

References PassManagers.

Referenced by PMTopLevelManager().

◆ collectLastUses()

void PMTopLevelManager::collectLastUses ( SmallVectorImpl< Pass * > &  LastUses,
Pass P 
)

Collect passes whose last user is P.

Definition at line 618 of file LegacyPassManager.cpp.

References llvm::SmallVectorImpl< T >::append(), and P.

Referenced by llvm::PMDataManager::dumpLastUses(), and llvm::PMDataManager::removeDeadPasses().

◆ dumpArguments()

void PMTopLevelManager::dumpArguments ( ) const

◆ dumpPasses()

void PMTopLevelManager::dumpPasses ( ) const

◆ findAnalysisPass()

Pass * PMTopLevelManager::findAnalysisPass ( AnalysisID  AID)

Find the pass that implements Analysis AID.

Search immutable passes and all pass managers. If desired pass is not found then return NULL.

Definition at line 772 of file LegacyPassManager.cpp.

References P, and PassManagers.

Referenced by llvm::PMDataManager::findAnalysisPass(), schedulePass(), and setLastUser().

◆ findAnalysisPassInfo()

const PassInfo * PMTopLevelManager::findAnalysisPassInfo ( AnalysisID  AID) const

◆ findAnalysisUsage()

AnalysisUsage * PMTopLevelManager::findAnalysisUsage ( Pass P)

◆ getImmutablePasses()

SmallVectorImpl<ImmutablePass *>& llvm::PMTopLevelManager::getImmutablePasses ( )
inline

◆ getNumContainedManagers()

unsigned llvm::PMTopLevelManager::getNumContainedManagers ( ) const
inlineprotected

◆ initializeAllAnalysisInfo()

void PMTopLevelManager::initializeAllAnalysisInfo ( )
protected

◆ schedulePass()

void PMTopLevelManager::schedulePass ( Pass P)

◆ setLastUser()

void PMTopLevelManager::setLastUser ( ArrayRef< Pass * >  AnalysisPasses,
Pass P 
)

Member Data Documentation

◆ activeStack

PMStack llvm::PMTopLevelManager::activeStack

◆ PassManagers

SmallVector<PMDataManager *, 8> llvm::PMTopLevelManager::PassManagers
protected

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