| /llvm-project-15.0.7/llvm/unittests/Analysis/ |
| H A D | ProfileSummaryInfoTest.cpp | 130 EXPECT_FALSE(PSI.hasSampleProfile()); in TEST_F() 134 EXPECT_FALSE(PSI.isHotCount(1000)); in TEST_F() 135 EXPECT_FALSE(PSI.isHotCount(0)); in TEST_F() 136 EXPECT_FALSE(PSI.isColdCount(1000)); in TEST_F() 137 EXPECT_FALSE(PSI.isColdCount(0)); in TEST_F() 160 EXPECT_TRUE(PSI.hasProfileSummary()); in TEST_F() 161 EXPECT_TRUE(PSI.isHotCount(400)); in TEST_F() 162 EXPECT_TRUE(PSI.isColdCount(2)); in TEST_F() 163 EXPECT_FALSE(PSI.isColdCount(100)); in TEST_F() 164 EXPECT_FALSE(PSI.isHotCount(100)); in TEST_F() [all …]
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | MachineSizeOpts.cpp | 32 ProfileSummaryInfo *PSI, in isColdBlock() argument 39 ProfileSummaryInfo *PSI, in isColdBlock() argument 82 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraph() argument 98 ProfileSummaryInfo *PSI, in isFunctionHotInCallGraphNthPercentile() argument 133 ProfileSummaryInfo *PSI, in isFunctionHotInCallGraphNthPercentile() 136 CutOff, MF, PSI, MBFI); in isFunctionHotInCallGraphNthPercentile() 142 CutOff, MF, PSI, MBFI); in isFunctionColdInCallGraphNthPercentile() 159 CutOff, MBB, PSI, MBFI); in isHotBlockNthPercentile() 188 MF, PSI, MBFI, QueryType); in shouldOptimizeForSize() 197 MBB, PSI, MBFI, QueryType); in shouldOptimizeForSize() [all …]
|
| H A D | MachineFunctionSplitter.cpp | 81 ProfileSummaryInfo *PSI) { in isColdBlock() argument 87 return PSI->isColdCountNthPercentile(PercentileCutoff, *Count); in isColdBlock() 121 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() local 130 else if (isColdBlock(MBB, MBFI, PSI)) in runOnMachineFunction() 137 if (!isColdBlock(*LP, MBFI, PSI)) in runOnMachineFunction()
|
| H A D | TailDuplication.cpp | 88 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 D | ExpandMemCmp.cpp | 742 ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI, in expandMemCmp() argument 766 llvm::shouldOptimizeForSize(CI->getParent(), PSI, BFI); in expandMemCmp() 822 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnFunction() local 823 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction() 829 auto PA = runImpl(F, TLI, TTI, TL, PSI, BFI, DT); in runOnFunction() 845 const TargetLowering *TL, ProfileSummaryInfo *PSI, 850 const DataLayout &DL, ProfileSummaryInfo *PSI, 857 const DataLayout &DL, ProfileSummaryInfo *PSI, in runOnBlock() argument 868 expandMemCmp(CI, TTI, TL, &DL, PSI, BFI, DTU, Func == LibFunc_bcmp)) { in runOnBlock() 878 const TargetLowering *TL, ProfileSummaryInfo *PSI, in runImpl() argument [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/ |
| H A D | SizeOpts.h | 43 (PSI->hasSampleProfile() && in isPGSOColdCodeOnly() 45 (PSI->hasPartialSampleProfile() && in isPGSOColdCodeOnly() 54 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldFuncOptimizeForSizeImpl() 60 if (isPGSOColdCodeOnly(PSI)) in shouldFuncOptimizeForSizeImpl() 62 if (PSI->hasSampleProfile()) in shouldFuncOptimizeForSizeImpl() 66 PgsoCutoffSampleProf, F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 74 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldOptimizeForSizeImpl() 80 if (isPGSOColdCodeOnly(PSI)) in shouldOptimizeForSizeImpl() 81 return AdapterT::isColdBlock(BBOrBlockFreq, PSI, BFI); in shouldOptimizeForSizeImpl() 82 if (PSI->hasSampleProfile()) in shouldOptimizeForSizeImpl() [all …]
|
| H A D | SampleProfileLoaderBaseUtil.h | 41 ProfileSummaryInfo *PSI) const; 43 ProfileSummaryInfo *PSI) const; 46 ProfileSummaryInfo *PSI) const; 89 bool callsiteIsHot(const FunctionSamples *CallsiteFS, ProfileSummaryInfo *PSI,
|
| H A D | Cloning.h | 204 ProfileSummaryInfo *PSI = nullptr, 207 : CG(cg), GetAssumptionCache(GetAssumptionCache), PSI(PSI), in CG() 215 ProfileSummaryInfo *PSI; variable
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | SizeOpts.cpp | 63 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraph() 65 return PSI->isFunctionColdInCallGraph(F, BFI); in isFunctionColdInCallGraph() 71 return PSI->isFunctionHotInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionHotInCallGraphNthPercentile() 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() 91 ProfileSummaryInfo *PSI, in isColdBlockNthPercentile() 93 return PSI->isColdBlockNthPercentile(CutOff, BB, BFI); in isColdBlockNthPercentile() [all …]
|
| H A D | SampleProfileLoaderBaseUtil.cpp | 73 assert(PSI && "PSI is expected to be non null"); in callsiteIsHot() 76 return !PSI->isColdCount(CallsiteTotalSamples); in callsiteIsHot() 78 return PSI->isHotCount(CallsiteTotalSamples); in callsiteIsHot() 102 ProfileSummaryInfo *PSI) const { in countUsedRecords() 115 if (callsiteIsHot(CalleeSamples, PSI, ProfAccForSymsInList)) in countUsedRecords() 116 Count += countUsedRecords(CalleeSamples, PSI); in countUsedRecords() 127 ProfileSummaryInfo *PSI) const { in countBodyRecords() 134 if (callsiteIsHot(CalleeSamples, PSI, ProfAccForSymsInList)) in countBodyRecords() 135 Count += countBodyRecords(CalleeSamples, PSI); in countBodyRecords() 155 if (callsiteIsHot(CalleeSamples, PSI, ProfAccForSymsInList)) in countBodySamples() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Transforms/Utils/ |
| H A D | SizeOptsTest.cpp | 58 ProfileSummaryInfo PSI(*M.get()); in TEST_F() local 70 EXPECT_TRUE(PSI.hasProfileSummary()); in TEST_F() 71 EXPECT_FALSE(shouldOptimizeForSize(F, &PSI, BFI_F, PGSOQueryType::Test)); in TEST_F() 72 EXPECT_TRUE(shouldOptimizeForSize(G, &PSI, BFI_G, PGSOQueryType::Test)); in TEST_F() 73 EXPECT_FALSE(shouldOptimizeForSize(H, &PSI, BFI_H, PGSOQueryType::Test)); in TEST_F() 74 EXPECT_FALSE(shouldOptimizeForSize(&BB0, &PSI, BFI_F, PGSOQueryType::Test)); in TEST_F() 75 EXPECT_FALSE(shouldOptimizeForSize(BB1, &PSI, BFI_F, PGSOQueryType::Test)); in TEST_F() 76 EXPECT_TRUE(shouldOptimizeForSize(BB2, &PSI, BFI_F, PGSOQueryType::Test)); in TEST_F() 77 EXPECT_FALSE(shouldOptimizeForSize(BB3, &PSI, BFI_F, PGSOQueryType::Test)); in TEST_F()
|
| /llvm-project-15.0.7/llvm/unittests/Target/X86/ |
| H A D | MachineSizeOptsTest.cpp | 100 ProfileSummaryInfo PSI = ProfileSummaryInfo(*M.get()); in TEST_F() local 101 ASSERT_TRUE(PSI.hasProfileSummary()); in TEST_F() 117 EXPECT_FALSE(shouldOptimizeForSize(F, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 118 EXPECT_TRUE(shouldOptimizeForSize(G, &PSI, MBFI_G, PGSOQueryType::Test)); in TEST_F() 119 EXPECT_FALSE(shouldOptimizeForSize(H, &PSI, MBFI_H, PGSOQueryType::Test)); in TEST_F() 120 EXPECT_FALSE(shouldOptimizeForSize(&BB0, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 121 EXPECT_FALSE(shouldOptimizeForSize(BB1, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 122 EXPECT_TRUE(shouldOptimizeForSize(BB2, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 123 EXPECT_FALSE(shouldOptimizeForSize(BB3, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | LoopLoadElimination.cpp | 165 ProfileSummaryInfo* PSI) in LoadEliminationForLoop() argument 166 : L(L), LI(LI), LAI(LAI), DT(DT), BFI(BFI), PSI(PSI), PSE(LAI.getPSE()) {} in LoadEliminationForLoop() 552 llvm::shouldOptimizeForSize(HeaderBB, PSI, BFI, in processLoop() 602 ProfileSummaryInfo *PSI; member in __anon24b71e560311::LoadEliminationForLoop 610 BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, in eliminateLoadsAcrossLoops() argument 636 LoadEliminationForLoop LEL(L, &LI, GetLAI(*L), &DT, BFI, PSI); in eliminateLoadsAcrossLoops() 661 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnFunction() local 662 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction() 669 F, LI, DT, BFI, PSI, SE, /*AC*/ nullptr, in runOnFunction() 722 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in run() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/ |
| H A D | IndirectCallPromotion.cpp | 152 bool processFunction(ProfileSummaryInfo *PSI); 298 bool ICallPromotionFunc::processFunction(ProfileSummaryInfo *PSI) { in processFunction() argument 307 (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) in processFunction() 329 static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI, in promoteIndirectCalls() argument 357 bool FuncChanged = ICallPromotion.processFunction(PSI); in promoteIndirectCalls() 373 ProfileSummaryInfo *PSI = &AM.getResult<ProfileSummaryAnalysis>(M); in run() local 375 if (!promoteIndirectCalls(M, PSI, InLTO | ICPLTOMode, in run()
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/ |
| H A D | MachineSizeOpts.h | 28 bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, 34 ProfileSummaryInfo *PSI, 40 ProfileSummaryInfo *PSI,
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | OptimizationRemarkEmitter.cpp | 105 if (ProfileSummaryInfo *PSI = in runOnFunction() local 108 PSI->getOrCompHotCountThreshold()); in runOnFunction() 137 if (ProfileSummaryInfo *PSI = in run() local 140 PSI->getOrCompHotCountThreshold()); in run()
|
| H A D | InlineCost.cpp | 216 ProfileSummaryInfo *PSI; member in __anon9893a50b0111::CallAnalyzer 457 ProfileSummaryInfo *PSI = nullptr, in CallAnalyzer() argument 460 PSI(PSI), F(Callee), DL(F.getParent()->getDataLayout()), ORE(ORE), in CallAnalyzer() 746 if (!PSI || !PSI->hasProfileSummary()) in isCostBenefitAnalysisEnabled() 758 if (!PSI->hasInstrumentationProfile()) in isCostBenefitAnalysisEnabled() 1004 ProfileSummaryInfo *PSI = nullptr, in InlineCostCallAnalyzer() argument 1732 if (PSI && PSI->hasProfileSummary()) in isColdCallSite() 1757 if (PSI && PSI->hasProfileSummary() && PSI->isHotCallSite(Call, CallerBFI)) in getHotCallSiteThreshold() 1864 } else if (PSI) { in updateThreshold() 1867 if (PSI->isFunctionEntryHot(&Callee)) { in updateThreshold() [all …]
|
| H A D | ModuleSummaryAnalysis.cpp | 125 ProfileSummaryInfo *PSI) { in getHotness() argument 126 if (!PSI) in getHotness() 128 if (PSI->isHotCount(ProfileCount)) in getHotness() 130 if (PSI->isColdCount(ProfileCount)) in getHotness() 370 auto ScaledCount = PSI->getProfileCount(*CB, BFI); in computeFunctionSummary() 418 .updateHotness(getHotness(Candidate.Count, PSI)); in computeFunctionSummary() 682 ProfileSummaryInfo *PSI, in buildModuleSummaryIndex() argument 684 assert(PSI); in buildModuleSummaryIndex() 799 computeFunctionSummary(Index, M, F, BFI, PSI, DT, in buildModuleSummaryIndex() 897 &PSI, in run() [all …]
|
| H A D | ProfileSummaryInfo.cpp | 389 PSI.reset(new ProfileSummaryInfo(M)); in doInitialization() 394 PSI.reset(); in doFinalization() 406 ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); in run() local 411 if (PSI.isFunctionEntryHot(&F)) in run() 413 else if (PSI.isFunctionEntryCold(&F)) in run()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86PadShortFunction.cpp | 117 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 D | X86FixupBWInsts.cpp | 151 ProfileSummaryInfo *PSI; member in __anon7f6449270111::FixupBWInstPass 169 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() 170 MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction() 458 llvm::shouldOptimizeForSize(&MBB, PSI, MBFI); in processBasicBlock()
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | InlineCost.h | 266 ProfileSummaryInfo *PSI = nullptr, 280 ProfileSummaryInfo *PSI = nullptr, 305 ProfileSummaryInfo *PSI = nullptr, 314 ProfileSummaryInfo *PSI = nullptr,
|
| H A D | ProfileSummaryInfo.h | 194 std::unique_ptr<ProfileSummaryInfo> PSI; variable 200 ProfileSummaryInfo &getPSI() { return *PSI; } in getPSI() 201 const ProfileSummaryInfo &getPSI() const { return *PSI; } in getPSI()
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/GlobalISel/ |
| H A D | InstructionSelector.h | 447 ProfileSummaryInfo *PSI = nullptr; variable 463 PSI = psi; in setupMF() 491 (PSI && BFI && CurMBB && llvm::shouldOptForSize(*CurMBB, PSI, BFI)); in shouldOptForSize()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/ |
| H A D | InstructionSelect.cpp | 100 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() 101 if (PSI && PSI->hasProfileSummary()) in runOnMachineFunction() 107 ISel->setupMF(MF, KB, CoverageInfo, PSI, BFI); in runOnMachineFunction()
|