Alternative analysis pass that computes branch probabilities on demand.
Synopsis
Declared in <llvm/Analysis/LazyBranchProbabilityInfo.h>
class LazyBranchProbabilityInfoPass
: public FunctionPass
Description
This is an alternative analysis pass to BranchProbabilityInfoWrapperPass. The difference is that with this pass the branch probabilities are not computed when the analysis pass is executed but rather when the BPI results is explicitly requested by the analysis client.
There are some additional requirements for any client pass that wants to use the analysis:
1. The pass needs to initialize dependent passes with:
INITIALIZE_PASS_DEPENDENCY(LazyBPIPass)
2. Similarly, getAnalysisUsage should call:
LazyBranchProbabilityInfoPass::getLazyBPIAnalysisUsage(AU)
3. The computed BPI should be requested with getAnalysis<LazyBranchProbabilityInfoPass>().getBPI() before CycleInfo could be invalidated for example by changing the CFG.
Note that it is expected that we wouldn't need this functionality for the new PM since with the new PM, analyses are executed on demand.
Base Classes
Name |
Description |
FunctionPass class ‐ This class is used to implement most global optimizations. Optimizations should subclass this class if they meet the following constraints: |
Member Functions
Name |
Description |
|
Construct a LazyBranchProbabilityInfoPass. |
|
Passes are not assignable. |
|
|
|
createPrinterPass ‐ Get a function printer pass. |
|
Perform any cleanup needed after all passes have run. |
|
Perform any initialization needed before any pass is run. |
Print this pass's state to stderr for debugging. |
|
|
Print the pass nesting structure for ‐debug‐passes=PassStructure. |
|
|
|
|
Get an optional analysis result that may already be available. |
|
|
Declare the analyses required and preserved by this pass. |
|
Return this pass as an ImmutablePass, or null if it is not one. |
|
Return this pass as a PMDataManager when it is a nested pass manager. |
Compute and return the branch probabilities. |
|
Return a nice clean name for a pass corresponding to that used to enable the pass in opt. |
|
getPassID ‐ Return the PassID number that corresponds to this pass. |
|
Return the kind of pass (module, function, loop, etc.). |
|
|
Return a human‐readable name for this pass. |
|
Return what kind of Pass Manager can manage this pass. |
Return the analysis resolver installed for this pass. |
|
Report whether the analysis identified by |
|
|
Check whether available pass managers are suitable for this pass. |
|
Print the computed branch probabilities. |
|
Serialize the IR unit this pass operates on for ‐‐print‐changed. |
|
Release the cached lazy BPI between runs. |
|
Set up lazy BPI analysis for function |
Install the analysis resolver used to satisfy this pass's dependencies. |
|
|
verifyAnalysis() ‐ This member can be implemented by a analysis pass to check state of analysis information. |
Static Member Functions
Name |
Description |
Construct a new instance of the pass identified by |
|
Helper for client passes to set up the analysis usage on behalf of this pass. |
|
|
Static Data Members
Name |
Description |
Pass identification, replacement for typeid. |
Protected Member Functions
Name |
Description |
Check whether this optional pass should be skipped for |
Non-Member Functions
Name |
Description |
Build a SimplifyQuery from analyses currently valid in a pass. |
|
Request the timer for this legacy‐pass‐manager's pass instance. |
|
Check whether a pass is a BitcodeWriterPass. |
|
Return true if a pass is for IR printing. |
Created with MrDocs