15#ifndef LLVM_TRANSFORMS_UTILS_SAMPLEPROFILELOADERBASEUTIL_H
16#define LLVM_TRANSFORMS_UTILS_SAMPLEPROFILELOADERBASEUTIL_H
23using namespace sampleprof;
25class ProfileSummaryInfo;
33namespace sampleprofutil {
49 SampleCoverage.
clear();
55 using BodySampleCoverageMap = std::map<LineLocation, unsigned>;
56 using FunctionSamplesCoverageMap =
68 FunctionSamplesCoverageMap SampleCoverage;
85 bool ProfAccForSymsInList =
false;
90 bool ProfAccForSymsInList);
This file defines the DenseMap class.
Machine Check Debug Module
A Module instance is used to store all the information related to an LLVM module.
Analysis providing profile information.
Representation of the samples collected for a function.
unsigned countBodyRecords(const FunctionSamples *FS, ProfileSummaryInfo *PSI) const
Return the number of sample records in the body of this profile.
unsigned countUsedRecords(const FunctionSamples *FS, ProfileSummaryInfo *PSI) const
Return the number of sample records that were applied from this profile.
unsigned computeCoverage(unsigned Used, unsigned Total) const
Return the fraction of sample records used in this profile.
uint64_t getTotalUsedSamples() const
uint64_t countBodySamples(const FunctionSamples *FS, ProfileSummaryInfo *PSI) const
Return the number of samples collected in the body of this profile.
void setProfAccForSymsInList(bool V)
bool markSamplesUsed(const FunctionSamples *FS, uint32_t LineOffset, uint32_t Discriminator, uint64_t Samples)
Mark as used the sample record for the given function samples at (LineOffset, Discriminator).
void createFSDiscriminatorVariable(Module *M)
Create a global variable to flag FSDiscriminators are used.
bool callsiteIsHot(const FunctionSamples *CallsiteFS, ProfileSummaryInfo *PSI, bool ProfAccForSymsInList)
Return true if the given callsite is hot wrt to hot cutoff threshold.
This is an optimization pass for GlobalISel generic memory operations.
cl::opt< unsigned > SampleProfileSampleCoverage
cl::opt< unsigned > SampleProfileRecordCoverage
cl::opt< unsigned > SampleProfileMaxPropagateIterations
cl::opt< bool > NoWarnSampleUnused