30 200000, 300000, 400000, 500000, 600000, 700000, 800000,
31 900000, 950000, 990000, 999000, 999900, 999990, 999999};
40 addEntryCount(R.
Counts[0]);
59 if (DetailedSummaryCutoffs.empty())
62 auto Iter = CountFrequencies.begin();
63 const auto End = CountFrequencies.end();
66 uint64_t CurrSum = 0, Count = 0;
68 for (
const uint32_t Cutoff : DetailedSummaryCutoffs) {
77 while (CurrSum < DesiredCount && Iter != End) {
80 CurrSum += (Count * Freq);
84 assert(CurrSum >= DesiredCount);
92 return llvm::make_unique<ProfileSummary>(
99 return llvm::make_unique<ProfileSummary>(
104 void InstrProfSummaryBuilder::addEntryCount(uint64_t Count) {
111 void InstrProfSummaryBuilder::addInternalCount(uint64_t Count) {
113 if (Count > MaxInternalBlockCount)
114 MaxInternalBlockCount = Count;
uint64_t getZExtValue() const
Get zero extended value.
This class represents lattice values for constants.
APInt sdiv(const APInt &RHS) const
Signed division function for APInt.
static const ArrayRef< uint32_t > DefaultCutoffs
A vector of useful cutoff values for detailed summary.
void addCount(uint64_t Count)
This is called when a count is seen in the profile.
void addRecord(const InstrProfRecord &)
Representation of the samples collected for a function.
void computeDetailedSummary()
This file contains the simple types necessary to represent the attributes associated with functions a...
uint64_t getHeadSamples() const
Return the total number of branch samples that have the function as the branch target.
const BodySampleMap & getBodySamples() const
Return all the samples collected in the body of the function.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
uint64_t MaxFunctionCount
void sort(IteratorTy Start, IteratorTy End)
std::unique_ptr< ProfileSummary > getSummary()
void addRecord(const sampleprof::FunctionSamples &FS)
SummaryEntryVector DetailedSummary
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Class for arbitrary precision integers.
std::unique_ptr< ProfileSummary > getSummary()
std::vector< uint64_t > Counts
Profiling information for a single function.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const uint32_t DefaultCutoffsData[]