54 for (
const auto &MBB : *MF)
69 FunctionCount.getCount()))
71 for (
const auto &MBB : *MF)
79 struct MachineBasicBlockBFIAdapter {
91 CutOff, MF, PSI, MBFI);
103 CutOff, MBB, PSI, MBFI);
112 return shouldFuncOptimizeForSizeImpl<MachineBasicBlockBFIAdapter>(
113 MF, PSI, MBFI, QueryType);
120 return shouldOptimizeForSizeImpl<MachineBasicBlockBFIAdapter>(
121 MBB, PSI, MBFI, QueryType);
bool isFunctionColdInCallGraph(const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo &MBFI)
Like ProfileSummaryInfo::isFunctionColdInCallGraph but for MachineFunction.
This class represents lattice values for constants.
bool isColdCount(uint64_t C)
Returns true if count C is considered cold.
Analysis providing profile information.
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
static bool isHotBlockNthPercentile(int PercentileCutoff, const MachineBasicBlock *MBB, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *MBFI)
Like ProfileSummaryInfo::isHotBlockNthPercentile but for MachineBasicBlock.
Optional< uint64_t > getBlockProfileCount(const MachineBasicBlock *MBB) const
cl::opt< bool > EnablePGSO
ProfileCount getEntryCount(bool AllowSynthetic=false) const
Get the entry count for this function.
bool isHotCountNthPercentile(int PercentileCutoff, uint64_t C)
Returns true if count C is considered hot with regard to a given hot percentile cutoff value...
cl::opt< int > PgsoCutoffInstrProf
const Function & getFunction() const
Return the LLVM function that this machine code represents.
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< bool > PGSOLargeWorkingSetSizeOnly
bool isFunctionHotInCallGraphNthPercentile(int PercentileCutoff, const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo &MBFI)
Like ProfileSummaryInfo::isFunctionHotInCallGraphNthPercentile but for MachineFunction.
bool isColdBlock(const MachineBasicBlock *MBB, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *MBFI)
Like ProfileSummaryInfo::isColdBlock but for MachineBasicBlock.
cl::opt< bool > ForcePGSO
cl::opt< int > PgsoCutoffSampleProf