17 #ifndef LLVM_ANALYSIS_LAZYBLOCKFREQUENCYINFO_H 18 #define LLVM_ANALYSIS_LAZYBLOCKFREQUENCYINFO_H 26 class BranchProbabilityInfo;
34 template <
typename FunctionT,
typename BranchProbabilityInfoPassT,
35 typename LoopInfoT,
typename BlockFrequencyInfoT>
39 : Calculated(
false), F(nullptr), BPIPass(nullptr), LI(nullptr) {}
42 void setAnalysis(
const FunctionT *F, BranchProbabilityInfoPassT *BPIPass,
43 const LoopInfoT *LI) {
45 this->BPIPass = BPIPass;
52 assert(F && BPIPass && LI &&
"call setAnalysis");
71 BlockFrequencyInfoT BFI;
74 BranchProbabilityInfoPassT *BPIPass;
This is an alternative analysis pass to BlockFrequencyInfoWrapperPass.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
A global registry used in conjunction with static constructors to make pluggable components (like tar...
void initializeLazyBFIPassPass(PassRegistry &Registry)
Helper for client passes to initialize dependent passes for LBFI.
Simple trait class that provides a mapping between BPI passes and the corresponding BPInfo...
This is an alternative analysis pass to BranchProbabilityInfoWrapperPass.
const BlockFrequencyInfoT & getCalculated() const
BlockFrequencyInfoT & getCalculated()
Retrieve the BFI with the block frequencies computed.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
static bool runOnFunction(Function &F, bool PostInlining)
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
const BlockFrequencyInfo & getBFI() const
Compute and return the block frequencies.
Wraps a BFI to allow lazy computation of the block frequencies.
BlockFrequencyInfo & getBFI()
Compute and return the block frequencies.
void setAnalysis(const FunctionT *F, BranchProbabilityInfoPassT *BPIPass, const LoopInfoT *LI)
Set up the per-function input.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...