15 #ifndef LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H
16 #define LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H
31 class BlockFrequencyInfo;
47 std::unique_ptr<ProfileSummary> Summary;
48 bool computeSummary();
49 void computeThresholds();
56 : M(Arg.M), Summary(std::move(Arg.Summary)) {}
111 std::unique_ptr<ProfileSummaryInfo> PSI;
bool hasInstrumentationProfile()
Returns true if module M has instrumentation profile.
A Module instance is used to store all the information related to an LLVM module. ...
bool isColdBB(const BasicBlock *B, BlockFrequencyInfo *BFI)
Returns true if BasicBlock B is considered cold.
bool isFunctionHotInCallGraph(const Function *F)
Returns true if F has hot function entry or hot call edge.
bool isColdCount(uint64_t C)
Returns true if count C is considered cold.
Analysis providing profile information.
bool invalidate(Module &, const PreservedAnalyses &, ModuleAnalysisManager::Invalidator &)
Handle the invalidation of this information.
This class represents a function call, abstracting a target machine's calling convention.
Optional< uint64_t > getProfileCount(const Instruction *CallInst, BlockFrequencyInfo *BFI)
Returns the profile count for CallInst.
bool isHotCount(uint64_t C)
Returns true if F is a hot function.
bool isFunctionEntryCold(const Function *F)
Returns true if F has cold function entry.
bool isHotCallSite(const CallSite &CS, BlockFrequencyInfo *BFI)
Returns true if CallSite CS is considered hot.
Result run(Module &M, ModuleAnalysisManager &)
An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo.
bool isHotBB(const BasicBlock *B, BlockFrequencyInfo *BFI)
Returns true if BasicBlock B is considered hot.
ProfileSummaryInfoWrapperPass()
ProfileSummaryInfo(Module &M)
A CRTP mix-in to automatically provide informational APIs needed for passes.
ProfileSummaryPrinterPass(raw_ostream &OS)
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
bool hasProfileSummary()
Returns true if profile summary is available.
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.
bool isFunctionColdInCallGraph(const Function *F)
Returns true if F has cold function entry or cold call edge.
bool hasSampleProfile()
Returns true if module M has sample profile.
An analysis pass based on the new PM to deliver ProfileSummaryInfo.
ProfileSummaryInfo * getPSI()
A CRTP mix-in that provides informational APIs needed for analysis passes.
Represent the analysis usage information of a pass.
bool doFinalization(Module &M) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
ImmutablePass class - This class is used to provide information that does not need to be run...
void setPreservesAll()
Set by analyses that do not transform their input at all.
ProfileSummaryInfo(ProfileSummaryInfo &&Arg)
Printer pass that uses ProfileSummaryAnalysis.
bool isFunctionEntryHot(const Function *F)
Returns true if F has hot function entry.
API to communicate dependencies between analyses during invalidation.
bool isColdCallSite(const CallSite &CS, BlockFrequencyInfo *BFI)
Returns true if Callsite CS is considered cold.
This class implements an extremely fast bulk output stream that can only output to a stream...
ProfileSummaryInfo Result
A container for analyses that lazily runs them and caches their results.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
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...