Home
last modified time | relevance | path

Searched refs:PSI (Results 1 – 25 of 103) sorted by relevance

12345

/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DSizeOpts.h40 static inline bool isPGSOColdCodeOnly(ProfileSummaryInfo *PSI) { in isPGSOColdCodeOnly() argument
42 (PSI->hasInstrumentationProfile() && PGSOColdCodeOnlyForInstrPGO) || in isPGSOColdCodeOnly()
43 (PSI->hasSampleProfile() && in isPGSOColdCodeOnly()
44 ((!PSI->hasPartialSampleProfile() && PGSOColdCodeOnlyForSamplePGO) || in isPGSOColdCodeOnly()
45 (PSI->hasPartialSampleProfile() && in isPGSOColdCodeOnly()
47 (PGSOLargeWorkingSetSizeOnly && !PSI->hasLargeWorkingSetSize()); in isPGSOColdCodeOnly()
51 bool shouldFuncOptimizeForSizeImpl(const FuncT *F, ProfileSummaryInfo *PSI, in shouldFuncOptimizeForSizeImpl() argument
54 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldFuncOptimizeForSizeImpl()
60 if (isPGSOColdCodeOnly(PSI)) in shouldFuncOptimizeForSizeImpl()
61 return PSI->isFunctionColdInCallGraph(F, *BFI); in shouldFuncOptimizeForSizeImpl()
[all …]
H A DSampleProfileLoaderBaseUtil.h41 ProfileSummaryInfo *PSI) const;
43 ProfileSummaryInfo *PSI) const;
46 ProfileSummaryInfo *PSI) const;
89 bool callsiteIsHot(const FunctionSamples *CallsiteFS, ProfileSummaryInfo *PSI,
H A DCloning.h207 ProfileSummaryInfo *PSI = nullptr,
210 : GetAssumptionCache(GetAssumptionCache), PSI(PSI), CallerBFI(CallerBFI), in GetAssumptionCache()
216 ProfileSummaryInfo *PSI; variable
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSizeOpts.cpp63 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraph()
65 return PSI->isFunctionColdInCallGraph(F, BFI); in isFunctionColdInCallGraph()
69 ProfileSummaryInfo *PSI, in isFunctionHotInCallGraphNthPercentile()
71 return PSI->isFunctionHotInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionHotInCallGraphNthPercentile()
75 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraphNthPercentile()
77 return PSI->isFunctionColdInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionColdInCallGraphNthPercentile()
80 ProfileSummaryInfo *PSI, in isColdBlock()
82 return PSI->isColdBlock(BB, BFI); in isColdBlock()
86 ProfileSummaryInfo *PSI, in isHotBlockNthPercentile()
88 return PSI->isHotBlockNthPercentile(CutOff, BB, BFI); in isHotBlockNthPercentile()
[all …]
H A DSampleProfileLoaderBaseUtil.cpp64 bool callsiteIsHot(const FunctionSamples *CallsiteFS, ProfileSummaryInfo *PSI, in callsiteIsHot() argument
69 assert(PSI && "PSI is expected to be non null"); in callsiteIsHot()
72 return !PSI->isColdCount(CallsiteTotalSamples); in callsiteIsHot()
74 return PSI->isHotCount(CallsiteTotalSamples); in callsiteIsHot()
98 ProfileSummaryInfo *PSI) const { in countUsedRecords()
111 if (callsiteIsHot(CalleeSamples, PSI, ProfAccForSymsInList)) in countUsedRecords()
112 Count += countUsedRecords(CalleeSamples, PSI); in countUsedRecords()
123 ProfileSummaryInfo *PSI) const { in countBodyRecords()
130 if (callsiteIsHot(CalleeSamples, PSI, ProfAccForSymsInList)) in countBodyRecords()
131 Count += countBodyRecords(CalleeSamples, PSI); in countBodyRecords()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DMachineFunctionSplitter.cpp110 ProfileSummaryInfo *PSI) { in isColdBlock() argument
114 if (PSI->hasInstrumentationProfile() || PSI->hasCSInstrumentationProfile()) { in isColdBlock()
120 return PSI->isColdCountNthPercentile(PercentileCutoff, *Count); in isColdBlock()
122 } else if (PSI->hasSampleProfile()) { in isColdBlock()
151 ProfileSummaryInfo *PSI = nullptr; in runOnMachineFunction() local
154 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction()
159 if (PSI->hasSampleProfile() && !PSI->isFunctionHotInCallGraph(&MF, *MBFI)) { in runOnMachineFunction()
175 else if (UseProfileData && isColdBlock(MBB, MBFI, PSI) && in runOnMachineFunction()
188 if (!isColdBlock(*LP, MBFI, PSI) || !TII.isMBBSafeToSplitToCold(*LP)) in runOnMachineFunction()
H A DMachineSizeOpts.cpp28 ProfileSummaryInfo *PSI, in shouldOptimizeForSize() argument
31 return shouldFuncOptimizeForSizeImpl(MF, PSI, MBFI, QueryType); in shouldOptimizeForSize()
35 ProfileSummaryInfo *PSI, in shouldOptimizeForSize() argument
39 return shouldOptimizeForSizeImpl(MBB, PSI, MBFI, QueryType); in shouldOptimizeForSize()
43 ProfileSummaryInfo *PSI, in shouldOptimizeForSize() argument
47 if (!PSI || !MBFIW) in shouldOptimizeForSize()
50 return shouldOptimizeForSizeImpl(BlockFreq, PSI, &MBFIW->getMBFI(), in shouldOptimizeForSize()
H A DTailDuplication.cpp88 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() local
89 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction()
94 Duplicator.initMF(MF, PreRegAlloc, MBPI, MBFI ? MBFIW.get() : nullptr, PSI, in runOnMachineFunction()
H A DExpandMemCmp.cpp832 ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI, in expandMemCmp() argument
856 llvm::shouldOptimizeForSize(CI->getParent(), PSI, BFI); in expandMemCmp()
893 const DataLayout &DL, ProfileSummaryInfo *PSI,
899 ProfileSummaryInfo *PSI,
924 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnFunction() local
925 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction()
931 auto PA = runImpl(F, TLI, TTI, TL, PSI, BFI, DT); in runOnFunction()
948 const DataLayout &DL, ProfileSummaryInfo *PSI, in runOnBlock() argument
958 expandMemCmp(CI, TTI, TL, &DL, PSI, BFI, DTU, Func == LibFunc_bcmp)) { in runOnBlock()
967 const TargetLowering *TL, ProfileSummaryInfo *PSI, in runImpl() argument
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DPGOForceFunctionAttrs.cpp18 static bool shouldRunOnFunction(Function &F, ProfileSummaryInfo &PSI, in shouldRunOnFunction() argument
27 if (!PSI.hasProfileSummary()) in shouldRunOnFunction()
30 return PSI.isFunctionColdInCallGraph(&F, BFI); in shouldRunOnFunction()
37 ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); in run() local
42 if (!shouldRunOnFunction(F, PSI, FAM)) in run()
H A DLowerAllowCheckPass.cpp74 const ProfileSummaryInfo *PSI, in removeUbsanTraps() argument
100 if (PSI) { in removeUbsanTraps()
102 IsHot = PSI->isHotCountNthPercentile(HotPercentileCutoff, Count); in removeUbsanTraps()
134 ProfileSummaryInfo *PSI = in run() local
140 return removeUbsanTraps(F, BFI, PSI, ORE) ? PreservedAnalyses::none() in run()
H A DIndirectCallPromotion.cpp306 ProfileSummaryInfo *PSI = nullptr; member in __anon5ae95e860111::IndirectCallPromoter
394 Function &Func, Module &M, ProfileSummaryInfo *PSI, in IndirectCallPromoter() argument
399 : F(Func), M(M), PSI(PSI), Symtab(Symtab), SamplePGO(SamplePGO), in IndirectCallPromoter()
405 bool processFunction(ProfileSummaryInfo *PSI);
805 bool IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) { in processFunction() argument
814 (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) in processFunction()
892 if (PSI && PSI->hasProfileSummary() && in isProfitableToCompareVTables()
893 !PSI->isColdCount(RemainingVTableCount)) { in isProfitableToCompareVTables()
962 static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI, bool InLTO, in promoteIndirectCalls() argument
995 IndirectCallPromoter CallPromoter(F, M, PSI, &Symtab, SamplePGO, in promoteIndirectCalls()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DAlwaysInliner.cpp34 Module &M, bool InsertLifetime, ProfileSummaryInfo &PSI, in AlwaysInlineImpl() argument
64 InlineFunctionInfo IFI(GetAssumptionCache, &PSI, in AlwaysInlineImpl()
129 auto &PSI = getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnModule() local
137 return AlwaysInlineImpl(M, InsertLifetime, PSI, GetAssumptionCache, GetAAR, in runOnModule()
178 auto &PSI = MAM.getResult<ProfileSummaryAnalysis>(M); in run() local
180 bool Changed = AlwaysInlineImpl(M, InsertLifetime, PSI, GetAssumptionCache, in run()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DMachineSizeOpts.h28 bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI,
34 ProfileSummaryInfo *PSI,
40 ProfileSummaryInfo *PSI,
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopLoadElimination.cpp174 ProfileSummaryInfo* PSI) in LoadEliminationForLoop() argument
175 : L(L), LI(LI), LAI(LAI), DT(DT), BFI(BFI), PSI(PSI), PSE(LAI.getPSE()) {} in LoadEliminationForLoop()
591 llvm::shouldOptimizeForSize(HeaderBB, PSI, BFI, in processLoop()
641 ProfileSummaryInfo *PSI; member in __anon087f49260311::LoadEliminationForLoop
650 ProfileSummaryInfo *PSI, in eliminateLoadsAcrossLoops() argument
676 LoadEliminationForLoop LEL(L, &LI, LAIs.getInfo(*L), &DT, BFI, PSI); in eliminateLoadsAcrossLoops()
695 auto *PSI = MAMProxy.getCachedResult<ProfileSummaryAnalysis>(*F.getParent()); in run() local
696 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in run()
700 bool Changed = eliminateLoadsAcrossLoops(F, LI, DT, BFI, PSI, &SE, &AC, LAIs); in run()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DOptimizationRemarkEmitter.cpp107 if (ProfileSummaryInfo *PSI = in runOnFunction() local
110 PSI->getOrCompHotCountThreshold()); in runOnFunction()
139 if (ProfileSummaryInfo *PSI = in run() local
142 PSI->getOrCompHotCountThreshold()); in run()
H A DProfileSummaryInfo.cpp232 PSI.reset(new ProfileSummaryInfo(M));
237 PSI.reset(); in ProfileSummaryInfoWrapperPass()
249 ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); in doFinalization()
254 if (PSI.isFunctionEntryHot(&F)) in run()
256 else if (PSI.isFunctionEntryCold(&F))
259 ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); run() local
H A DInlineCost.cpp253 ProfileSummaryInfo *PSI; member in __anon463f3bdb0111::CallAnalyzer
498 ProfileSummaryInfo *PSI = nullptr, in CallAnalyzer() argument
501 PSI(PSI), F(Callee), DL(F.getDataLayout()), ORE(ORE), in CallAnalyzer()
690 GetAssumptionCache, GetBFI, PSI, ORE, false); in onLoweredCall()
796 if (!PSI || !PSI->hasProfileSummary()) in isCostBenefitAnalysisEnabled()
808 if (!PSI->hasInstrumentationProfile()) in isCostBenefitAnalysisEnabled()
821 if (!PSI->isHotCallSite(CandidateCall, CallerBFI)) in isCostBenefitAnalysisEnabled()
964 APInt Threshold(128, PSI->getOrCompHotCountThreshold()); in costBenefitAnalysis()
1108 ProfileSummaryInfo *PSI = nullptr, in InlineCostCallAnalyzer() argument
1111 : CallAnalyzer(Callee, Call, TTI, GetAssumptionCache, GetBFI, PSI, ORE), in InlineCostCallAnalyzer()
[all …]
H A DModuleSummaryAnalysis.cpp162 ProfileSummaryInfo *PSI) { in getHotness() argument
163 if (!PSI) in getHotness()
165 if (PSI->isHotCount(ProfileCount)) in getHotness()
167 if (PSI->isColdCount(ProfileCount)) in getHotness()
299 BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, DominatorTree &DT, in computeFunctionSummary() argument
430 auto ScaledCount = PSI->getProfileCount(*CB, BFI); in computeFunctionSummary()
431 auto Hotness = ScaledCount ? getHotness(*ScaledCount, PSI) in computeFunctionSummary()
490 .updateHotness(getHotness(Candidate.Count, PSI)); in computeFunctionSummary()
568 if (PSI->hasPartialSampleProfile() && ScalePartialSampleProfileWorkingSetSize) in computeFunctionSummary()
887 ProfileSummaryInfo *PSI, in buildModuleSummaryIndex() argument
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86PadShortFunction.cpp117 auto *PSI = in runOnMachineFunction() local
119 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction()
136 bool OptForSize = llvm::shouldOptimizeForSize(MBB, PSI, MBFI); in runOnMachineFunction()
H A DX86FixupBWInsts.cpp144 ProfileSummaryInfo *PSI = nullptr; member in __anon46e815f70111::FixupBWInstPass
161 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction()
162 MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction()
447 llvm::shouldOptimizeForSize(&MBB, PSI, MBFI); in processBasicBlock()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInlineCost.h283 ProfileSummaryInfo *PSI = nullptr,
297 ProfileSummaryInfo *PSI = nullptr,
322 ProfileSummaryInfo *PSI = nullptr,
331 ProfileSummaryInfo *PSI = nullptr,
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/
H A DGIMatchTableExecutor.h574 ProfileSummaryInfo *PSI = nullptr; variable
589 PSI = psi;
621 (PSI && BFI && CurMBB && llvm::shouldOptForSize(*CurMBB, PSI, BFI)); in shouldOptForSize()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/
H A DLoopVectorizationLegality.h247 AssumptionCache *AC, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI) in LoopVectorizationLegality() argument
250 PSI(PSI) {} in LoopVectorizationLegality()
547 ProfileSummaryInfo *PSI; variable
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DInstructionSelect.cpp100 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction()
101 if (PSI && PSI->hasProfileSummary()) in runOnMachineFunction()
107 ISel->setupMF(MF, KB, &CoverageInfo, PSI, BFI); in runOnMachineFunction()

12345