class PMTopLevelManager

Declaration

class PMTopLevelManager { /* full declaration omitted */ };

Description

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

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:158

Member Variables

public llvm::PMStack activeStack
protected SmallVector<llvm::PMDataManager*, 8> PassManagers
Collection of pass managers
private SmallVector<llvm::PMDataManager*, 8> IndirectPassManagers
Collection of pass managers that are not directly maintained by this pass manager
private DenseMap<llvm::Pass*, llvm::Pass*> LastUser
private DenseMap<llvm::Pass*, SmallPtrSet<llvm::Pass*, 8>> InversedLastUser
private SmallVector<llvm::ImmutablePass*, 16> ImmutablePasses
Immutable passes are managed by top level manager.
private SmallDenseMap<llvm::AnalysisID, llvm::ImmutablePass*, 8> ImmutablePassMap
Map from ID to immutable passes.
private FoldingSet< llvm::PMTopLevelManager::AUFoldingSetNode> UniqueAnalysisUsages
private SpecificBumpPtrAllocator< llvm::PMTopLevelManager::AUFoldingSetNode> AUFoldingSetNodeAllocator
private DenseMap<llvm::Pass*, llvm::AnalysisUsage*> AnUsageMap
private DenseMap<llvm::AnalysisID, const llvm::PassInfo*> AnalysisPassInfos
Collection of PassInfo objects found via analysis IDs and in this top level manager. This is used to memoize queries to the pass registry. FIXME: This is an egregious hack because querying the pass registry is either slow or racy.

Method Overview

Methods

PMTopLevelManager(llvm::PMDataManager* PMDM)

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:160

Parameters

llvm::PMDataManager* PMDM

void addImmutablePass(llvm::ImmutablePass* P)

Description

Add immutable pass and initialize it.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:198

Parameters

llvm::ImmutablePass* P

inline void addIndirectPassManager(
    llvm::PMDataManager* Manager)

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:210

Parameters

llvm::PMDataManager* Manager

void addPassManager(llvm::PMDataManager* Manager)

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:204

Parameters

llvm::PMDataManager* Manager

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

Description

Collect passes whose last user is P

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:182

Parameters

SmallVectorImpl<llvm::Pass*>& LastUses
llvm::Pass* P

void dumpArguments() const

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:216

void dumpPasses() const

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:215

llvm::Pass* findAnalysisPass(llvm::AnalysisID AID)

Description

Find the pass that implements Analysis AID. Search immutable passes and all pass managers. If desired pass is not found then return NULL.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:187

Parameters

llvm::AnalysisID AID

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

Description

Retrieve the PassInfo for an analysis.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:190

Parameters

llvm::AnalysisID AID

llvm::AnalysisUsage* findAnalysisUsage(
    llvm::Pass* P)

Description

Find analysis usage information for the pass P.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:193

Parameters

llvm::Pass* P

virtual llvm::PMDataManager* getAsPMDataManager()

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:169

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

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:200

unsigned int getNumContainedManagers() const

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:162

virtual llvm::PassManagerType
getTopLevelPassManagerType()

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:170

void initializeAllAnalysisInfo()

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:166

void schedulePass(llvm::Pass* P)

Description

Schedule pass P for execution. Make sure that passes required by P are run before P is run. Update analysis info maintained by the manager. Remove dead passes. This is a recursive function.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:176

Parameters

llvm::Pass* P

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

Description

Set pass P as the last user of the given analysis passes.

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:179

Parameters

ArrayRef<llvm::Pass*> AnalysisPasses
llvm::Pass* P

virtual ~PMTopLevelManager()

Declared at: llvm/include/llvm/IR/LegacyPassManagers.h:195