LLVM 20.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]

Public Member Functions

void schedulePass (Pass *P)
 Schedule pass P for execution.
 
void setLastUser (ArrayRef< Pass * > AnalysisPasses, Pass *P)
 Set pass P as the last user of the given analysis passes.
 
void collectLastUses (SmallVectorImpl< Pass * > &LastUses, Pass *P)
 Collect passes whose last user is P.
 
PassfindAnalysisPass (AnalysisID AID)
 Find the pass that implements Analysis AID.
 
const PassInfofindAnalysisPassInfo (AnalysisID AID) const
 Retrieve the PassInfo for an analysis.
 
AnalysisUsagefindAnalysisUsage (Pass *P)
 Find analysis usage information for the pass P.
 
virtual ~PMTopLevelManager ()
 Destructor.
 
void addImmutablePass (ImmutablePass *P)
 Add immutable pass and initialize it.
 
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.
 
unsigned getNumContainedManagers () const
 
void initializeAllAnalysisInfo ()
 

Protected Attributes

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

Detailed Description

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

Definition at line 158 of file LegacyPassManagers.h.

Constructor & Destructor Documentation

◆ PMTopLevelManager()

PMTopLevelManager::PMTopLevelManager ( PMDataManager PMDM)
explicitprotected

Initialize top level manager. Create first pass manager.

Definition at line 555 of file LegacyPassManager.cpp.

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

◆ ~PMTopLevelManager()

PMTopLevelManager::~PMTopLevelManager ( )
virtual

Destructor.

Definition at line 854 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 799 of file LegacyPassManager.cpp.

References P.

Referenced by schedulePass().

◆ addIndirectPassManager()

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

◆ addPassManager()

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

Definition at line 204 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 615 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 769 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: