1#ifndef LLVM_ANALYSIS_STATICDATAPROFILEINFO_H
2#define LLVM_ANALYSIS_STATICDATAPROFILEINFO_H
37 std::optional<uint64_t> Count);
57 bool doInitialization(
Module &M)
override;
58 bool doFinalization(
Module &M)
override;
72 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.
ImmutablePass class - This class is used to provide information that does not need to be run.
A Module instance is used to store all the information related to an LLVM module.
Analysis providing profile information.
This wraps the StaticDataProfileInfo object as an immutable pass, for a backend pass to operate on.
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.
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.
StaticDataProfileInfo()=default
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
Return a section prefix for the constant C based on its profile count.
DenseMap< const Constant *, uint64_t > ConstantProfileCounts
Accummulate the profile count of a constant that will be lowered to static data sections.
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.
This is an optimization pass for GlobalISel generic memory operations.