14 #ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H
15 #define LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H
25 class BranchProbabilityInfo;
33 std::unique_ptr<ImplType> BFI;
BlockFrequencyInfo Result
Provide the result typedef for this analysis pass.
Result run(Function &F, FunctionAnalysisManager &AM)
Run the analysis pass over a function and produce BFI.
raw_ostream & printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const
A Module instance is used to store all the information related to an LLVM module. ...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
~BlockFrequencyInfoWrapperPass() override
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
const BlockFrequencyInfo & getBFI() const
Legacy analysis pass which computes BlockFrequencyInfo.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Optional< uint64_t > getProfileCountFromFreq(uint64_t Freq) const
Returns the estimated profile count of Freq.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
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.
uint64_t getEntryFreq() const
BlockFrequencyPrinterPass(raw_ostream &OS)
Analysis pass which computes BlockFrequencyInfo.
BlockFrequencyInfoWrapperPass()
void setBlockFreq(const BasicBlock *BB, uint64_t Freq)
void print(raw_ostream &OS) const
const BranchProbabilityInfo * getBPI() const
Analysis providing branch probability information.
const Function * getFunction() const
void view() const
Pop up a ghostview window with the current block frequency propagation rendered using dot...
BlockFrequencyInfo & getBFI()
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
This class implements an extremely fast bulk output stream that can only output to a stream...
Shared implementation for block frequency analysis.
A container for analyses that lazily runs them and caches their results.
Optional< uint64_t > getBlockProfileCount(const BasicBlock *BB) const
Returns the estimated profile count of BB.
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...
BlockFrequency getBlockFreq(const BasicBlock *BB) const
getblockFreq - Return block frequency.