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();
60 : M(
Arg.M), Summary(
std::move(
Arg.Summary)) {}
121 return HotCountThreshold ? HotCountThreshold.
getValue() : 0;
125 return ColdCountThreshold ? ColdCountThreshold.
getValue() : 0;
131 std::unique_ptr<ProfileSummaryInfo> PSI;
141 bool doInitialization(
Module &M)
override;
142 bool doFinalization(
Module &M)
override;
bool hasInstrumentationProfile()
Returns true if module M has instrumentation profile.
Compute iterated dominance frontiers using a linear time algorithm.
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.
uint64_t getHotCountThreshold()
Returns HotCountThreshold if set.
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.
uint64_t getOrCompHotCountThreshold()
Returns HotCountThreshold if set.
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.
uint64_t getOrCompColdCountThreshold()
Returns ColdCountThreshold if set.
bool isFunctionHotInCallGraph(const Function *F, BlockFrequencyInfo &BFI)
Returns true if F contains hot code.
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.
ProfileSummaryInfo(Module &M)
const T & getValue() const LLVM_LVALUE_FUNCTION
A CRTP mix-in to automatically provide informational APIs needed for passes.
ProfileSummaryPrinterPass(raw_ostream &OS)
bool hasProfileSummary()
Returns true if profile summary is available.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
A set of analyses that are preserved following a run of a transformation pass.
LLVM Basic Block Representation.
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.
ImmutablePass class - This class is used to provide information that does not need to be run...
uint64_t getColdCountThreshold()
Returns ColdCountThreshold if set.
bool isFunctionColdInCallGraph(const Function *F, BlockFrequencyInfo &BFI)
Returns true if F contains only cold code.
void setPreservesAll()
Set by analyses that do not transform their input at all.
ProfileSummaryInfo(ProfileSummaryInfo &&Arg)
amdgpu Simplify well known AMD library false Value Value * 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.
bool hasHugeWorkingSetSize()
Returns true if the working set size of the code is considered huge.
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...