16#ifndef LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
17#define LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
55 class LazyBranchProbabilityInfo {
59 :
F(
F), LI(LI), TLI(TLI) {}
64 assert(
F && LI &&
"call setAnalysis");
65 BPI.calculate(*
F, *LI, TLI,
nullptr,
nullptr);
72 return const_cast<LazyBranchProbabilityInfo *
>(
this)->getCalculated();
77 bool Calculated =
false;
83 std::unique_ptr<LazyBranchProbabilityInfo> LBPI;
103 void releaseMemory()
override;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
static bool runOnFunction(Function &F, bool PostInlining)
Represent the analysis usage information of a pass.
Analysis providing branch probability information.
This is an alternative analysis pass to BranchProbabilityInfoWrapperPass.
const BranchProbabilityInfo & getBPI() const
Compute and return the branch probabilities.
BranchProbabilityInfo & getBPI()
Compute and return the branch probabilities.
LazyBranchProbabilityInfoPass()
A Module instance is used to store all the information related to an LLVM module.
Provides information about what library functions are available for the current target.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void initializeLazyBPIPassPass(PassRegistry &Registry)
Helper for client passes to initialize dependent passes for LBPI.
MachinePassRegistry< typename RegisterRegAllocBase< T >::FunctionPassCtor > RegisterRegAllocBase< T >::Registry
RegisterRegAlloc's global Registry tracks allocator registration.
static BranchProbabilityInfo & getBPI(LazyBranchProbabilityInfoPass *P)
Simple trait class that provides a mapping between BPI passes and the corresponding BPInfo.
static PassT & getBPI(PassT *P)