1#ifndef LLVM_ANALYSIS_STATICDATAPROFILEINFO_H
2#define LLVM_ANALYSIS_STATICDATAPROFILEINFO_H
65 std::optional<StringRef> SectionPrefix)
const;
81 std::optional<uint64_t>
Count);
112 std::unique_ptr<StaticDataProfileInfo>
Info;
Analysis containing CSE Info
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
This is an important base class in LLVM.
Implements a dense probed hash-table based set.
A Module instance is used to store all the information related to an LLVM module.
Analysis providing profile information.
bool doFinalization(Module &M) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
const StaticDataProfileInfo & getStaticDataProfileInfo() const
void getAnalysisUsage(AnalysisUsage &AU) const override
This pass provides StaticDataProfileInfo for reads/writes but does not modify M or other analysis.
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
StaticDataProfileInfoWrapperPass()
StaticDataProfileInfo & getStaticDataProfileInfo()
A class that holds the constants that represent static data and their profile information and provide...
LLVM_ABI std::optional< uint64_t > getConstantProfileCount(const Constant *C) const
If C has a count, return it. Otherwise, return std::nullopt.
LLVM_ABI StaticDataHotness getConstantHotnessUsingProfileCount(const Constant *C, const ProfileSummaryInfo *PSI, uint64_t Count) const
Return the hotness of the constant C based on its profile count Count.
LLVM_ABI StringRef hotnessToStr(StaticDataHotness Hotness) const
Return the string representation of the hotness enum Hotness.
StaticDataHotness
Use signed enums for enum value comparison, and make 'LukewarmOrUnknown' as 0 so any accidentally uni...
bool EnableDataAccessProf
LLVM_ABI void addConstantProfileCount(const Constant *C, std::optional< uint64_t > Count)
If Count is not nullopt, add it to the profile count of the constant C in a saturating way,...
LLVM_ABI StringRef getConstantSectionPrefix(const Constant *C, const ProfileSummaryInfo *PSI) const
Given a constant C, returns a section prefix.
LLVM_ABI StaticDataHotness getSectionHotnessUsingDataAccessProfile(std::optional< StringRef > SectionPrefix) const
Return the hotness based on section prefix SectionPrefix.
StaticDataProfileInfo(bool EnableDataAccessProf)
DenseMap< const Constant *, uint64_t > ConstantProfileCounts
A constant is tracked only if the following conditions are met.
DenseSet< const Constant * > ConstantWithoutCounts
Keeps track of the constants that are seen at least once without profile counts.
StringRef - Represent a constant reference to a string, i.e.
@ C
The default llvm calling convention, compatible with C.
AnnotationKind getAnnotationKind(const GlobalVariable &GV)
Returns the annotation kind of the global variable GV.
bool IsAnnotationOK(const GlobalVariable &GV)
Returns true if the annotation kind of the global variable GV is AnnotationOK.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Count