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:297

Member Variables

protected llvm::PMTopLevelManager* TPM
protected SmallVector<llvm::Pass*, 16> PassVector
protected DenseMap<llvm::AnalysisID, llvm::Pass*>* [6] InheritedAnalysis

Method Overview

Methods

PMDataManager()

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

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:326

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:331

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:349

Parameters

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

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

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

Parameters

llvm::Pass* P
unsigned int Offset

void dumpPassArguments() const

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

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

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

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:376

Parameters

const llvm::Pass* P

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

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

Parameters

const llvm::Pass* P

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

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

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:416

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:361

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:321

Parameters

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

virtual llvm::Pass* getAsPass()

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

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

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

unsigned int getDepth() const

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

unsigned int getNumContainedPasses() const

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

virtual llvm::Pass* getOnTheFlyPass(
    llvm::Pass* P,
    llvm::AnalysisID PI,
    llvm::Function& F)

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

Parameters

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

virtual llvm::PassManagerType getPassManagerType()
    const

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

llvm::PMTopLevelManager* getTopLevelManager()

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

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:403

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:357

Parameters

llvm::Pass* P

void initializeAnalysisInfo()

Description

Initialize available analysis information.

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

bool isPassDebuggingExecutionsOrMore() const

Description

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

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

void populateInheritedAnalysis(llvm::PMStack& PMS)

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

Parameters

llvm::PMStack& PMS

bool preserveHigherLevelAnalysis(llvm::Pass* P)

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

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:308

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:317

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:314

Parameters

llvm::Pass* P

void setDepth(unsigned int newDepth)

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

Parameters

unsigned int newDepth

void setTopLevelManager(
    llvm::PMTopLevelManager* T)

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

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:311

Parameters

llvm::Pass* P

virtual ~PMDataManager()

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