Go to the documentation of this file.
13 #ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H
14 #define LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H
26 class BranchProbabilityInfo;
40 std::unique_ptr<ImplType> BFI;
71 bool AllowSynthetic =
false)
const;
159 #endif // LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
BlockFrequencyPrinterPass(raw_ostream &OS)
void print(raw_ostream &OS) const
A CRTP mix-in to automatically provide informational APIs needed for passes.
Legacy analysis pass which computes BlockFrequencyInfo.
const BlockFrequencyInfo & getBFI() const
void view(StringRef="BlockFrequencyDAGs") const
Pop up a ghostview window with the current block frequency propagation rendered using dot.
~BlockFrequencyInfoWrapperPass() override
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
LLVM Basic Block Representation.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
uint64_t getEntryFreq() const
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Optional< uint64_t > getProfileCountFromFreq(uint64_t Freq) const
Returns the estimated profile count of Freq.
Analysis providing branch probability information.
Represent the analysis usage information of a pass.
void setBlockFreq(const BasicBlock *BB, uint64_t Freq)
This class implements an extremely fast bulk output stream that can only output to a stream.
API to communicate dependencies between analyses during invalidation.
raw_ostream & printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const
Analysis pass which computes BlockFrequencyInfo.
A special type used by analysis passes to provide an address that identifies that particular analysis...
BlockFrequencyInfo & operator=(const BlockFrequencyInfo &)=delete
@ BasicBlock
Various leaf nodes.
bool isIrrLoopHeader(const BasicBlock *BB)
Returns true if BB is an irreducible loop header block.
A Module instance is used to store all the information related to an LLVM module.
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.
Printer pass for the BlockFrequencyInfo results.
StringRef - Represent a constant reference to a string, i.e.
BlockFrequencyInfo & getBFI()
Machine Check Debug Module
bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &)
Handle invalidation explicitly.
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...
Result run(Function &F, FunctionAnalysisManager &AM)
Run the analysis pass over a function and produce BFI.
const BranchProbabilityInfo * getBPI() const
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
BlockFrequency getBlockFreq(const BasicBlock *BB) const
getblockFreq - Return block frequency.
const Function * getFunction() const
Optional< uint64_t > getBlockProfileCount(const BasicBlock *BB, bool AllowSynthetic=false) const
Returns the estimated profile count of BB.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void verifyMatch(BlockFrequencyInfo &Other) const
Shared implementation for block frequency analysis.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
A container for analyses that lazily runs them and caches their results.
FunctionPass class - This class is used to implement most global optimizations.
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
BlockFrequencyInfoWrapperPass()
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Optional< std::vector< StOtherPiece > > Other