FPPassManager manages BBPassManagers and FunctionPasses. It batches all function passes and basic block pass managers together and sequence them to process one function at a time before processing next function.

Synopsis

Declared in <llvm/IR/LegacyPassManagers.h>

class FPPassManager
    : public ModulePass
    , public PMDataManager

Base Classes

Name

Description

ModulePass

ModulePass class ‐ This class is used to implement unstructured interprocedural optimizations and analyses. ModulePasses may do anything they want to the program.

PMDataManager

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

Member Functions

Name

Description

FPPassManager [constructor]

Default constructor

operator= [deleted]

Copy assignment operator

add

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

addLowerLevelRequiredPass [virtual]

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.

assignPassManager

Each pass is responsible for assigning a pass manager to itself. PMS is the stack of available pass manager.

cleanup

cleanup ‐ After running all passes, clean up pass manager cache.

collectRequiredAndUsedAnalyses

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.

createPrinterPass [virtual]

createPrinterPass ‐ Get a module printer pass.

doFinalization

doFinalization overloads

doInitialization

doInitialization overloads

dump

dumpLastUses

dumpPassArguments

dumpPassInfo

dumpPassStructure

dumpPreservedSet

dumpRequiredSet

dumpUsedSet

emitInstrCountChangedRemark

Emit a remark signifying that the number of IR instructions in the module changed. F is optionally passed by passes which run on Functions, and thus always know whether or not a non‐empty function is available.

findAnalysisPass

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

freePass

Remove P.

getAnalysis

getAnalysis<AnalysisType>() ‐ This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function.

getAnalysisID

getAnalysisIfAvailable

getAnalysisIfAvailable<AnalysisType>() ‐ Subclasses use this function to get analysis information that might be around, for example to update it. This is different than getAnalysis in that it can fail (if the analysis results haven't been computed), so should only be used if you can handle the case when the analysis is not available. This method is often used by transformation APIs to update analysis results for a pass automatically as the transform is performed.

getAnalysisUsage

getAnalysisUsage overloads

getAsImmutablePass [virtual]

getAsPMDataManager [virtual]

getAsPass [virtual]

getAvailableAnalysis

getContainedPass

getDepth

getNumContainedPasses

getOnTheFlyPass [virtual]

getPassArgument

Return a nice clean name for a pass corresponding to that used to enable the pass in opt.

getPassID

getPassID ‐ Return the PassID number that corresponds to this pass.

getPassKind

getPassManagerType [virtual]

getPassName [virtual]

getPotentialPassManagerType [virtual]

Return what kind of Pass Manager can manage this pass.

getResolver

getTopLevelManager

initSizeRemarkInfo

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.

initializeAnalysisImpl

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.

initializeAnalysisInfo

Initialize available analysis information.

mustPreserveAnalysisID

mustPreserveAnalysisID ‐ This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. This obviously cannot give you a properly typed instance of the class if you don't have the class name available (use getAnalysisIfAvailable if you do), but it can tell you if you need to preserve the pass at least.

populateInheritedAnalysis

preparePassManager [virtual]

Check if available pass managers are suitable for this pass or not.

preserveHigherLevelAnalysis

print [virtual]

print ‐ Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.

recordAvailableAnalysis

Augment AvailableAnalysis by adding analysis made available by pass P.

releaseMemory [virtual]

releaseMemory() ‐ This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.

removeDeadPasses

Remove dead passes used by P.

removeNotPreservedAnalysis

Remove Analysis that is not preserved by the pass

runOnFunction

run ‐ Execute all of the passes scheduled for execution. Keep track of whether any of the passes modifies the module, and if so, return true.

runOnModule [virtual]

setDepth

setResolver

setTopLevelManager

verifyAnalysis [virtual]

verifyAnalysis() ‐ This member can be implemented by a analysis pass to check state of analysis information.

verifyPreservedAnalysis

verifyPreservedAnalysis ‐‐ Verify analysis presreved by pass P.

Static Member Functions

Static Data Members

Name

ID

Using Declarations

Name

Description

doFinalization

doFinalization ‐ Overrides ModulePass doFinalization for global finalization tasks

doInitialization

doInitialization ‐ Overrides ModulePass doInitialization for global initialization tasks

Protected Member Functions

Name

Description

isPassDebuggingExecutionsOrMore

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

skipModule

Optional passes call this function to check whether the pass should be skipped. This is the case when optimization bisect is over the limit.

Protected Data Members

Non-Member Functions

Name

Description

getPassTimer

Request the timer for this legacy‐pass‐manager's pass instance.

isBitcodeWriterPass

Check whether a pass is a BitcodeWriterPass.

isIRPrintingPass

Return true if a pass is for IR printing.

Created with MrDocs