13#ifndef LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
14#define LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
31class BlockFrequencyInfo;
50template <
typename FuncT,
typename BFIT>
71template <
typename BlockTOrBlockFreq,
typename BFIT>
94 BlockFrequencyInfo *BFI,
100 BlockFrequencyInfo *BFI,
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Analysis providing profile information.
bool hasProfileSummary() const
Returns true if profile summary is available.
bool isHotBlockNthPercentile(int PercentileCutoff, const BBType *BB, BFIT *BFI) const
bool isFunctionColdInCallGraph(const FuncT *F, BFIT &BFI) const
Returns true if F contains only cold code.
bool hasInstrumentationProfile() const
Returns true if module M has instrumentation profile.
bool isFunctionColdInCallGraphNthPercentile(int PercentileCutoff, const FuncT *F, BFIT &BFI) const
Returns true if F contains cold code with regard to a given cold percentile cutoff value.
bool hasSampleProfile() const
Returns true if module M has sample profile.
bool isColdBlock(const BBType *BB, BFIT *BFI) const
Returns true if BasicBlock BB is considered cold.
bool isFunctionHotInCallGraphNthPercentile(int PercentileCutoff, const FuncT *F, BFIT &BFI) const
Returns true if F contains hot code with regard to a given hot percentile cutoff value.
bool hasPartialSampleProfile() const
Returns true if module M has partial-profile sample profile.
bool hasLargeWorkingSetSize() const
Returns true if the working set size of the code is considered large.
bool isColdBlockNthPercentile(int PercentileCutoff, const BBType *BB, BFIT *BFI) const
Returns true if BasicBlock BB is considered cold with regard to a given cold percentile cutoff value.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
cl::opt< bool > PGSOColdCodeOnlyForSamplePGO
cl::opt< bool > PGSOColdCodeOnlyForInstrPGO
bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *BFI, PGSOQueryType QueryType=PGSOQueryType::Other)
Returns true if machine function MF is suggested to be size-optimized based on the profile.
bool shouldFuncOptimizeForSizeImpl(const FuncT *F, ProfileSummaryInfo *PSI, BFIT *BFI, PGSOQueryType QueryType)
cl::opt< int > PgsoCutoffSampleProf
cl::opt< bool > EnablePGSO
cl::opt< bool > PGSOColdCodeOnlyForPartialSamplePGO
cl::opt< int > PgsoCutoffInstrProf
bool shouldOptimizeForSizeImpl(BlockTOrBlockFreq BBOrBlockFreq, ProfileSummaryInfo *PSI, BFIT *BFI, PGSOQueryType QueryType)
cl::opt< bool > ForcePGSO
cl::opt< bool > PGSOLargeWorkingSetSizeOnly
static bool isPGSOColdCodeOnly(ProfileSummaryInfo *PSI)
cl::opt< bool > PGSOColdCodeOnly