/external/llvm-project/llvm/unittests/Analysis/ |
D | ProfileSummaryInfoTest.cpp | 128 ProfileSummaryInfo PSI = buildPSI(M.get()); in TEST_F() local 129 EXPECT_FALSE(PSI.hasProfileSummary()); in TEST_F() 130 EXPECT_FALSE(PSI.hasSampleProfile()); in TEST_F() 131 EXPECT_FALSE(PSI.hasInstrumentationProfile()); 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() 139 EXPECT_FALSE(PSI.isFunctionEntryHot(F)); in TEST_F() 140 EXPECT_FALSE(PSI.isFunctionEntryCold(F)); in TEST_F() [all …]
|
/external/llvm-project/llvm/lib/CodeGen/ |
D | MachineSizeOpts.cpp | 32 ProfileSummaryInfo *PSI, in isColdBlock() argument 35 return Count && PSI->isColdCount(*Count); in isColdBlock() 39 ProfileSummaryInfo *PSI, in isColdBlock() argument 42 return Count && PSI->isColdCount(*Count); in isColdBlock() 48 ProfileSummaryInfo *PSI, in isHotBlockNthPercentile() argument 51 return Count && PSI->isHotCountNthPercentile(PercentileCutoff, *Count); in isHotBlockNthPercentile() 56 ProfileSummaryInfo *PSI, in isHotBlockNthPercentile() argument 59 return Count && PSI->isHotCountNthPercentile(PercentileCutoff, *Count); in isHotBlockNthPercentile() 64 ProfileSummaryInfo *PSI, in isColdBlockNthPercentile() argument 67 return Count && PSI->isColdCountNthPercentile(PercentileCutoff, *Count); in isColdBlockNthPercentile() [all …]
|
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()
|
D | MachineFunctionSplitter.cpp | 82 ProfileSummaryInfo *PSI) { in isColdBlock() argument 88 return PSI->isColdCountNthPercentile(PercentileCutoff, *Count); in isColdBlock() 122 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() local 130 if (isColdBlock(MBB, MBFI, PSI)) in runOnMachineFunction()
|
/external/llvm-project/llvm/include/llvm/Transforms/Utils/ |
D | SizeOpts.h | 42 static inline bool isPGSOColdCodeOnly(ProfileSummaryInfo *PSI) { in isPGSOColdCodeOnly() argument 44 (PSI->hasInstrumentationProfile() && PGSOColdCodeOnlyForInstrPGO) || in isPGSOColdCodeOnly() 45 (PSI->hasSampleProfile() && in isPGSOColdCodeOnly() 46 ((!PSI->hasPartialSampleProfile() && PGSOColdCodeOnlyForSamplePGO) || in isPGSOColdCodeOnly() 47 (PSI->hasPartialSampleProfile() && in isPGSOColdCodeOnly() 49 (PGSOLargeWorkingSetSizeOnly && !PSI->hasLargeWorkingSetSize()); in isPGSOColdCodeOnly() 53 bool shouldFuncOptimizeForSizeImpl(const FuncT *F, ProfileSummaryInfo *PSI, in shouldFuncOptimizeForSizeImpl() argument 56 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldFuncOptimizeForSizeImpl() 62 if (isPGSOColdCodeOnly(PSI)) in shouldFuncOptimizeForSizeImpl() 63 return AdapterT::isFunctionColdInCallGraph(F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() [all …]
|
D | Cloning.h | 177 ProfileSummaryInfo *PSI = nullptr, 180 : CG(cg), GetAssumptionCache(GetAssumptionCache), PSI(PSI), in CG() 187 ProfileSummaryInfo *PSI; variable
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/ |
D | MachineSizeOpts.cpp | 30 ProfileSummaryInfo *PSI, in isColdBlock() argument 33 return Count && PSI->isColdCount(*Count); in isColdBlock() 39 ProfileSummaryInfo *PSI, in isHotBlockNthPercentile() argument 42 return Count && PSI->isHotCountNthPercentile(PercentileCutoff, *Count); in isHotBlockNthPercentile() 49 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraph() argument 52 if (!PSI->isColdCount(FunctionCount.getCount())) in isFunctionColdInCallGraph() 55 if (!isColdBlock(&MBB, PSI, &MBFI)) in isFunctionColdInCallGraph() 65 ProfileSummaryInfo *PSI, in isFunctionHotInCallGraphNthPercentile() argument 68 if (PSI->isHotCountNthPercentile(PercentileCutoff, in isFunctionHotInCallGraphNthPercentile() 72 if (isHotBlockNthPercentile(PercentileCutoff, &MBB, PSI, &MBFI)) in isFunctionHotInCallGraphNthPercentile() [all …]
|
D | TailDuplication.cpp | 87 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnMachineFunction() local 88 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction() 91 Duplicator.initMF(MF, PreRegAlloc, MBPI, MBFI, PSI, /*LayoutMode=*/false); in runOnMachineFunction()
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Utils/ |
D | SizeOpts.h | 42 bool shouldFuncOptimizeForSizeImpl(const FuncT *F, ProfileSummaryInfo *PSI, in shouldFuncOptimizeForSizeImpl() argument 45 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldFuncOptimizeForSizeImpl() 57 (PGSOLargeWorkingSetSizeOnly && !PSI->hasLargeWorkingSetSize())) { in shouldFuncOptimizeForSizeImpl() 59 return AdapterT::isFunctionColdInCallGraph(F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 62 PSI->hasSampleProfile() ? PgsoCutoffSampleProf : PgsoCutoffInstrProf, in shouldFuncOptimizeForSizeImpl() 63 F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 67 bool shouldOptimizeForSizeImpl(const BlockT *BB, ProfileSummaryInfo *PSI, in shouldOptimizeForSizeImpl() argument 70 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldOptimizeForSizeImpl() 82 (PGSOLargeWorkingSetSizeOnly && !PSI->hasLargeWorkingSetSize())) { in shouldOptimizeForSizeImpl() 84 return AdapterT::isColdBlock(BB, PSI, BFI); in shouldOptimizeForSizeImpl() [all …]
|
/external/llvm-project/llvm/lib/Transforms/Utils/ |
D | SizeOpts.cpp | 63 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 …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/ |
D | SizeOpts.cpp | 53 ProfileSummaryInfo *PSI, in isFunctionColdInCallGraph() 55 return PSI->isFunctionColdInCallGraph(F, BFI); in isFunctionColdInCallGraph() 59 ProfileSummaryInfo *PSI, in isFunctionHotInCallGraphNthPercentile() 61 return PSI->isFunctionHotInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionHotInCallGraphNthPercentile() 64 ProfileSummaryInfo *PSI, in isColdBlock() 66 return PSI->isColdBlock(BB, BFI); in isColdBlock() 70 ProfileSummaryInfo *PSI, in isHotBlockNthPercentile() 72 return PSI->isHotBlockNthPercentile(CutOff, BB, BFI); in isHotBlockNthPercentile() 77 bool llvm::shouldOptimizeForSize(const Function *F, ProfileSummaryInfo *PSI, in shouldOptimizeForSize() argument 80 return shouldFuncOptimizeForSizeImpl<BasicBlockBFIAdapter>(F, PSI, BFI, in shouldOptimizeForSize() [all …]
|
/external/llvm-project/llvm/unittests/Transforms/Utils/ |
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()
|
/external/llvm-project/llvm/unittests/Target/X86/ |
D | MachineSizeOptsTest.cpp | 99 ProfileSummaryInfo PSI = ProfileSummaryInfo(*M.get()); in TEST_F() local 100 ASSERT_TRUE(PSI.hasProfileSummary()); in TEST_F() 116 EXPECT_FALSE(shouldOptimizeForSize(F, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 117 EXPECT_TRUE(shouldOptimizeForSize(G, &PSI, MBFI_G, PGSOQueryType::Test)); in TEST_F() 118 EXPECT_FALSE(shouldOptimizeForSize(H, &PSI, MBFI_H, PGSOQueryType::Test)); in TEST_F() 119 EXPECT_FALSE(shouldOptimizeForSize(&BB0, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 120 EXPECT_FALSE(shouldOptimizeForSize(BB1, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 121 EXPECT_TRUE(shouldOptimizeForSize(BB2, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F() 122 EXPECT_FALSE(shouldOptimizeForSize(BB3, &PSI, MBFI_F, PGSOQueryType::Test)); in TEST_F()
|
/external/llvm/lib/Analysis/ |
D | ProfileSummaryInfo.cpp | 129 if (!PSI) in getPSI() 130 PSI.reset(new ProfileSummaryInfo(M)); in getPSI() 131 return PSI.get(); in getPSI() 152 ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); in run() local 157 if (PSI.isHotFunction(&F)) in run() 159 else if (PSI.isColdFunction(&F)) in run()
|
/external/llvm-project/llvm/lib/Transforms/Instrumentation/ |
D | IndirectCallPromotion.cpp | 212 bool processFunction(ProfileSummaryInfo *PSI); 357 bool ICallPromotionFunc::processFunction(ProfileSummaryInfo *PSI) { in processFunction() argument 366 (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) in processFunction() 388 static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI, in promoteIndirectCalls() argument 417 bool FuncChanged = ICallPromotion.processFunction(PSI); in promoteIndirectCalls() 432 ProfileSummaryInfo *PSI = in runOnModule() local 436 return promoteIndirectCalls(M, PSI, InLTO | ICPLTOMode, in runOnModule() 442 ProfileSummaryInfo *PSI = &AM.getResult<ProfileSummaryAnalysis>(M); in run() local 444 if (!promoteIndirectCalls(M, PSI, InLTO | ICPLTOMode, in run()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Instrumentation/ |
D | IndirectCallPromotion.cpp | 213 bool processFunction(ProfileSummaryInfo *PSI); 352 bool ICallPromotionFunc::processFunction(ProfileSummaryInfo *PSI) { in processFunction() argument 361 (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) in processFunction() 383 static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI, in promoteIndirectCalls() argument 412 bool FuncChanged = ICallPromotion.processFunction(PSI); in promoteIndirectCalls() 427 ProfileSummaryInfo *PSI = in runOnModule() local 431 return promoteIndirectCalls(M, PSI, InLTO | ICPLTOMode, in runOnModule() 437 ProfileSummaryInfo *PSI = &AM.getResult<ProfileSummaryAnalysis>(M); in run() local 439 if (!promoteIndirectCalls(M, PSI, InLTO | ICPLTOMode, in run()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | LoopLoadElimination.cpp | 168 ProfileSummaryInfo* PSI) in LoadEliminationForLoop() argument 169 : L(L), LI(LI), LAI(LAI), DT(DT), BFI(BFI), PSI(PSI), PSE(LAI.getPSE()) {} in LoadEliminationForLoop() 548 llvm::shouldOptimizeForSize(HeaderBB, PSI, BFI, in processLoop() 594 ProfileSummaryInfo *PSI; member in __anon841e79f10311::LoadEliminationForLoop 602 BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, in eliminateLoadsAcrossLoops() argument 621 LoadEliminationForLoop LEL(L, &LI, GetLAI(*L), &DT, BFI, PSI); in eliminateLoadsAcrossLoops() 646 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); in runOnFunction() local 647 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction() 653 F, LI, DT, BFI, PSI, in runOnFunction() 701 auto *PSI = MAM.getCachedResult<ProfileSummaryAnalysis>(*F.getParent()); in run() local [all …]
|
/external/llvm-project/llvm/lib/Transforms/Scalar/ |
D | LoopLoadElimination.cpp | 169 ProfileSummaryInfo* PSI) in LoadEliminationForLoop() argument 170 : L(L), LI(LI), LAI(LAI), DT(DT), BFI(BFI), PSI(PSI), PSE(LAI.getPSE()) {} in LoadEliminationForLoop() 555 llvm::shouldOptimizeForSize(HeaderBB, PSI, BFI, in processLoop() 605 ProfileSummaryInfo *PSI; member in __anon29f72dfd0311::LoadEliminationForLoop 613 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() 668 F, LI, DT, BFI, PSI, /*SE*/ nullptr, /*AC*/ nullptr, in runOnFunction() 716 auto *PSI = MAMProxy.getCachedResult<ProfileSummaryAnalysis>(*F.getParent()); in run() local [all …]
|
/external/llvm-project/llvm/include/llvm/CodeGen/ |
D | MachineSizeOpts.h | 28 bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, 34 ProfileSummaryInfo *PSI, 40 ProfileSummaryInfo *PSI,
|
/external/llvm-project/llvm/lib/Transforms/IPO/ |
D | SampleProfile.cpp | 200 ProfileSummaryInfo *PSI) const; 202 ProfileSummaryInfo *PSI) const; 205 ProfileSummaryInfo *PSI) const; 374 ProfileSummaryInfo *PSI); 453 ProfileSummaryInfo *PSI = nullptr; member in __anon33472e0f0111::SampleProfileLoader 560 ProfileSummaryInfo *PSI) { in callsiteIsHot() argument 564 assert(PSI && "PSI is expected to be non null"); in callsiteIsHot() 567 return !PSI->isColdCount(CallsiteTotalSamples); in callsiteIsHot() 569 return PSI->isHotCount(CallsiteTotalSamples); in callsiteIsHot() 593 ProfileSummaryInfo *PSI) const { in countUsedRecords() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/ |
D | SampleProfile.cpp | 188 ProfileSummaryInfo *PSI) const; 190 ProfileSummaryInfo *PSI) const; 193 ProfileSummaryInfo *PSI) const; 359 ProfileSummaryInfo *PSI); 431 ProfileSummaryInfo *PSI = nullptr; member in __anon3d3e97830111::SampleProfileLoader 530 ProfileSummaryInfo *PSI) { in callsiteIsHot() argument 534 assert(PSI && "PSI is expected to be non null"); in callsiteIsHot() 537 return !PSI->isColdCount(CallsiteTotalSamples); in callsiteIsHot() 539 return PSI->isHotCount(CallsiteTotalSamples); in callsiteIsHot() 563 ProfileSummaryInfo *PSI) const { in countUsedRecords() [all …]
|
/external/llvm-project/llvm/lib/Analysis/ |
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()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | ModuleSummaryAnalysis.cpp | 127 ProfileSummaryInfo *PSI) { in getHotness() argument 128 if (!PSI) in getHotness() 130 if (PSI->isHotCount(ProfileCount)) in getHotness() 132 if (PSI->isColdCount(ProfileCount)) in getHotness() 244 ProfileSummaryInfo *PSI, DominatorTree &DT, in computeFunctionSummary() argument 344 auto ScaledCount = PSI->getProfileCount(&I, BFI); in computeFunctionSummary() 345 auto Hotness = ScaledCount ? getHotness(ScaledCount.getValue(), PSI) in computeFunctionSummary() 391 .updateHotness(getHotness(Candidate.Count, PSI)); in computeFunctionSummary() 643 ProfileSummaryInfo *PSI) { in buildModuleSummaryIndex() argument 644 assert(PSI); in buildModuleSummaryIndex() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/ |
D | X86PadShortFunction.cpp | 117 auto *PSI = in runOnMachineFunction() local 119 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction() 137 bool OptForSize = llvm::shouldOptimizeForSize(MBB, PSI, MBFI); in runOnMachineFunction()
|
/external/llvm-project/llvm/lib/Target/X86/ |
D | X86PadShortFunction.cpp | 118 auto *PSI = in runOnMachineFunction() local 120 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction() 138 bool OptForSize = llvm::shouldOptimizeForSize(MBB, PSI, MBFI); in runOnMachineFunction()
|