14 #ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H 15 #define LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H 27 class BranchProbabilityInfo;
41 std::unique_ptr<ImplType> BFI;
156 #endif // LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H This class represents lattice values for constants.
BlockFrequencyInfo & operator=(const BlockFrequencyInfo &)=delete
A Module instance is used to store all the information related to an LLVM module. ...
void view(StringRef="BlockFrequencyDAGs") const
Pop up a ghostview window with the current block frequency propagation rendered using dot...
raw_ostream & printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
Legacy analysis pass which computes BlockFrequencyInfo.
void setBlockFreqAndScale(const BasicBlock *ReferenceBB, uint64_t Freq, SmallPtrSetImpl< BasicBlock *> &BlocksToScale)
Set the frequency of ReferenceBB to Freq and scale the frequencies of the blocks in BlocksToScale suc...
A CRTP mix-in to automatically provide informational APIs needed for passes.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
static bool runOnFunction(Function &F, bool PostInlining)
A set of analyses that are preserved following a run of a transformation pass.
LLVM Basic Block Representation.
Printer pass for the BlockFrequencyInfo results.
A CRTP mix-in that provides informational APIs needed for analysis passes.
void calculate(const Function &F, const BranchProbabilityInfo &BPI, const LoopInfo &LI)
calculate - compute block frequency info for the given function.
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
BlockFrequencyPrinterPass(raw_ostream &OS)
bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &)
Handle invalidation explicitly.
bool isIrrLoopHeader(const BasicBlock *BB)
Returns true if BB is an irreducible loop header block.
uint64_t getEntryFreq() const
Analysis pass which computes BlockFrequencyInfo.
void setBlockFreq(const BasicBlock *BB, uint64_t Freq)
BlockFrequency getBlockFreq(const BasicBlock *BB) const
getblockFreq - Return block frequency.
const BranchProbabilityInfo * getBPI() const
amdgpu Simplify well known AMD library false Value Value * Arg
Analysis providing branch probability information.
const BlockFrequencyInfo & getBFI() const
BlockFrequencyInfo & getBFI()
API to communicate dependencies between analyses during invalidation.
const Function * getFunction() const
This class implements an extremely fast bulk output stream that can only output to a stream...
Shared implementation for block frequency analysis.
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
A special type used by analysis passes to provide an address that identifies that particular analysis...
Optional< uint64_t > getProfileCountFromFreq(uint64_t Freq) const
Returns the estimated profile count of Freq.
Optional< uint64_t > getBlockProfileCount(const BasicBlock *BB) const
Returns the estimated profile count of BB.