class PMDataManager

Declaration

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

Description

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

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

Member Variables

protected llvm::PMTopLevelManager* TPM = nullptr
protected SmallVector<llvm::Pass*, 16> PassVector
protected DenseMap<llvm::AnalysisID, llvm::Pass*>* [6] InheritedAnalysis
private DenseMap<llvm::AnalysisID, llvm::Pass*> AvailableAnalysis
private SmallVector<llvm::Pass*, 16> HigherLevelAnalysis
private unsigned int Depth = 0

Method Overview

Methods

PMDataManager()

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

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

Description

Add pass P into the PassVector. Update AvailableAnalysis appropriately if ProcessAnalysis is true.

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

Parameters

llvm::Pass* P
bool ProcessAnalysis = true

virtual void addLowerLevelRequiredPass(
    llvm::Pass* P,
    llvm::Pass* RequiredPass)

Description

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.

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

Parameters

llvm::Pass* P
llvm::Pass* RequiredPass

void collectRequiredAndUsedAnalyses(
    SmallVectorImpl<llvm::Pass*>& UsedPasses,
    SmallVectorImpl<llvm::AnalysisID>&
        ReqPassNotAvailable,
    llvm::Pass* P)

Description

Populate UsedPasses 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.

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

Parameters

SmallVectorImpl<llvm::Pass*>& UsedPasses
SmallVectorImpl<llvm::AnalysisID>& ReqPassNotAvailable
llvm::Pass* P

void dumpAnalysisUsage(
    llvm::StringRef Msg,
    const llvm::Pass* P,
    const AnalysisUsage::VectorType& Set) const

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

Parameters

llvm::StringRef Msg
const llvm::Pass* P
const AnalysisUsage::VectorType& Set

void dumpLastUses(llvm::Pass* P,
                  unsigned int Offset) const

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

Parameters

llvm::Pass* P
unsigned int Offset

void dumpPassArguments() const

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

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

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

Parameters

llvm::Pass* P
enum PassDebuggingString S1
enum PassDebuggingString S2
llvm::StringRef Msg

void dumpPreservedSet(const llvm::Pass* P) const

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

Parameters

const llvm::Pass* P

void dumpRequiredSet(const llvm::Pass* P) const

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

Parameters

const llvm::Pass* P

void dumpUsedSet(const llvm::Pass* P) const

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

Parameters

const llvm::Pass* P

void emitInstrCountChangedRemark(
    llvm::Pass* P,
    llvm::Module& M,
    int64_t Delta,
    unsigned int CountBefore,
    StringMap<
        std::pair<unsigned int, unsigned int>>&
        FunctionToInstrCount,
    llvm::Function* F = nullptr)

Description

Emit a remark signifying that the number of IR instructions in the module changed.\p F is optionally passed by passes which run on Functions, and thus always know whether or not a non-empty function is available. \p FunctionToInstrCount maps the name of a \p Function to a pair. The first member of the pair is the IR count of the \p Function before running\p P, and the second member is the IR count of the \p Function after running \p P.

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

Parameters

llvm::Pass* P
llvm::Module& M
int64_t Delta
unsigned int CountBefore
StringMap<std::pair<unsigned int, unsigned int>>& FunctionToInstrCount
llvm::Function* F = nullptr

llvm::Pass* findAnalysisPass(llvm::AnalysisID AID,
                             bool Direction)

Description

Find the pass that implements Analysis AID. If desired pass is not found then return NULL.

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

Parameters

llvm::AnalysisID AID
bool Direction

void freePass(llvm::Pass* P,
              llvm::StringRef Msg,
              enum PassDebuggingString)

Description

Remove P.

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

Parameters

llvm::Pass* P
llvm::StringRef Msg
enum PassDebuggingString

virtual llvm::Pass* getAsPass()

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

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

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

unsigned int getDepth() const

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

unsigned int getNumContainedPasses() const

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

virtual std::tuple<Pass*, bool> getOnTheFlyPass(
    llvm::Pass* P,
    llvm::AnalysisID PI,
    llvm::Function& F)

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

Parameters

llvm::Pass* P
llvm::AnalysisID PI
llvm::Function& F

virtual llvm::PassManagerType getPassManagerType()
    const

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

llvm::PMTopLevelManager* getTopLevelManager()

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

unsigned int initSizeRemarkInfo(
    llvm::Module& M,
    StringMap<
        std::pair<unsigned int, unsigned int>>&
        FunctionToInstrCount)

Description

Set the initial size of the module if the user has specified that they want remarks for size. Returns 0 if the remark was not requested.

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

Parameters

llvm::Module& M
StringMap<std::pair<unsigned int, unsigned int>>& FunctionToInstrCount

void initializeAnalysisImpl(llvm::Pass* P)

Description

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.

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

Parameters

llvm::Pass* P

void initializeAnalysisInfo()

Description

Initialize available analysis information.

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

bool isPassDebuggingExecutionsOrMore() const

Description

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

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

void populateInheritedAnalysis(llvm::PMStack& PMS)

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

Parameters

llvm::PMStack& PMS

bool preserveHigherLevelAnalysis(llvm::Pass* P)

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

Parameters

llvm::Pass* P

void recordAvailableAnalysis(llvm::Pass* P)

Description

Augment AvailableAnalysis by adding analysis made available by pass P.

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

Parameters

llvm::Pass* P

void removeDeadPasses(llvm::Pass* P,
                      llvm::StringRef Msg,
                      enum PassDebuggingString)

Description

Remove dead passes used by P.

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

Parameters

llvm::Pass* P
llvm::StringRef Msg
enum PassDebuggingString

void removeNotPreservedAnalysis(llvm::Pass* P)

Description

Remove Analysis that is not preserved by the pass

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

Parameters

llvm::Pass* P

void setDepth(unsigned int newDepth)

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

Parameters

unsigned int newDepth

void setTopLevelManager(
    llvm::PMTopLevelManager* T)

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

Parameters

llvm::PMTopLevelManager* T

void verifyPreservedAnalysis(llvm::Pass* P)

Description

verifyPreservedAnalysis -- Verify analysis presreved by pass P.

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

Parameters

llvm::Pass* P

virtual ~PMDataManager()

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