Go to the documentation of this file.
16 #ifndef LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
17 #define LLVM_ANALYSIS_LAZYBRANCHPROBABILITYINFO_H
26 class TargetLibraryInfo;
56 class LazyBranchProbabilityInfo {
60 :
F(
F), LI(LI), TLI(TLI) {}
65 assert(
F && LI &&
"call setAnalysis");
66 BPI.calculate(*
F, *LI, TLI,
nullptr,
nullptr);
73 return const_cast<LazyBranchProbabilityInfo *
>(
this)->getCalculated();
78 bool Calculated =
false;
84 std::unique_ptr<LazyBranchProbabilityInfo> LBPI;
static PassT & getBPI(PassT *P)
This is an optimization pass for GlobalISel generic memory operations.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
Simple trait class that provides a mapping between BPI passes and the corresponding BPInfo.
static BranchProbabilityInfo & getBPI(LazyBranchProbabilityInfoPass *P)
const BranchProbabilityInfo & getBPI() const
Compute and return the branch probabilities.
Analysis providing branch probability information.
Represent the analysis usage information of a pass.
static void getLazyBPIAnalysisUsage(AnalysisUsage &AU)
Helper for client passes to set up the analysis usage on behalf of this pass.
This class implements an extremely fast bulk output stream that can only output to a stream.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void initializeLazyBPIPassPass(PassRegistry &Registry)
Helper for client passes to initialize dependent passes for LBPI.
BranchProbabilityInfo & getBPI()
Compute and return the branch probabilities.
A Module instance is used to store all the information related to an LLVM module.
LazyBranchProbabilityInfoPass()
Provides information about what library functions are available for the current target.
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
FunctionPass class - This class is used to implement most global optimizations.
This is an alternative analysis pass to BranchProbabilityInfoWrapperPass.