17 #ifndef LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
18 #define LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
56 class LazyBranchProbabilityInfo {
59 : Calculated(
false),
F(F), LI(LI) {}
64 assert(F && LI &&
"call setAnalysis");
65 BPI.calculate(*F, *LI);
72 return const_cast<LazyBranchProbabilityInfo *
>(
this)->getCalculated();
82 std::unique_ptr<LazyBranchProbabilityInfo> LBPI;
A Module instance is used to store all the information related to an LLVM module. ...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
static void getLazyBPIAnalysisUsage(AnalysisUsage &AU)
Helper for client passes to set up the analysis usage on behalf of this pass.
const BranchProbabilityInfo & getBPI() const
Compute and return the branch probabilities.
This is an alternative analysis pass to BranchProbabilityInfoWrapperPass.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
void initializeLazyBPIPassPass(PassRegistry &Registry)
Helper for client passes to initialize dependent passes for LBPI.
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
BranchProbabilityInfo & getBPI()
Compute and return the branch probabilities.
Analysis providing branch probability information.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
LazyBranchProbabilityInfoPass()