13#ifndef LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
14#define LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
31class BlockFrequencyInfo;
50template<
typename AdapterT,
typename FuncT,
typename BFIT>
61 return AdapterT::isFunctionColdInCallGraph(
F, PSI, *BFI);
65 return AdapterT::isFunctionColdInCallGraphNthPercentile(
71template<
typename AdapterT,
typename BlockTOrBlockFreq,
typename BFIT>
81 return AdapterT::isColdBlock(BBOrBlockFreq, PSI, BFI);
86 BBOrBlockFreq, PSI, BFI);
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 hasInstrumentationProfile() const
Returns true if module M has instrumentation profile.
bool hasSampleProfile() const
Returns true if module M has sample profile.
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.
@ 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.
cl::opt< int > PgsoCutoffSampleProf
cl::opt< bool > EnablePGSO
bool shouldOptimizeForSizeImpl(BlockTOrBlockFreq BBOrBlockFreq, ProfileSummaryInfo *PSI, BFIT *BFI, PGSOQueryType QueryType)
cl::opt< bool > PGSOColdCodeOnlyForPartialSamplePGO
cl::opt< int > PgsoCutoffInstrProf
cl::opt< bool > ForcePGSO
cl::opt< bool > PGSOLargeWorkingSetSizeOnly
bool shouldFuncOptimizeForSizeImpl(const FuncT *F, ProfileSummaryInfo *PSI, BFIT *BFI, PGSOQueryType QueryType)
static bool isPGSOColdCodeOnly(ProfileSummaryInfo *PSI)
cl::opt< bool > PGSOColdCodeOnly