| /openbsd/src/gnu/llvm/llvm/lib/Analysis/ |
| D | BlockFrequencyInfo.cpp | 145 const BlockFrequencyInfo *BFI) { in getEdgeAttributes() 146 return BFIDOTGTraitsBase::getEdgeAttributes(Node, EI, BFI, BFI->getBPI(), in getEdgeAttributes() 162 : BFI(std::move(Arg.BFI)) {} in BlockFrequencyInfo() 166 BFI = std::move(RHS.BFI); in operator =() 188 if (!BFI) in calculate() 189 BFI.reset(new ImplType); in calculate() 190 BFI->calculate(F, BPI, LI); in calculate() 204 return BFI ? BFI->getBlockFreq(BB) : 0; in getBlockFreq() 210 if (!BFI) in getBlockProfileCount() 213 return BFI->getBlockProfileCount(*getFunction(), BB, AllowSynthetic); in getBlockProfileCount() [all …]
|
| D | CFGPrinter.cpp | 62 static void writeCFGToDotFile(Function &F, BlockFrequencyInfo *BFI, in writeCFGToDotFile() argument 72 DOTFuncInfo CFGInfo(&F, BFI, BPI, MaxFreq); in writeCFGToDotFile() 84 static void viewCFG(Function &F, const BlockFrequencyInfo *BFI, in viewCFG() argument 87 DOTFuncInfo CFGInfo(&F, BFI, BPI, MaxFreq); in viewCFG() 106 auto *BFI = &getAnalysis<BlockFrequencyInfoWrapperPass>().getBFI(); in runOnFunction() local 107 viewCFG(F, BFI, BPI, getMaxFreq(F, BFI)); in runOnFunction() 129 auto *BFI = &AM.getResult<BlockFrequencyAnalysis>(F); in run() local 131 viewCFG(F, BFI, BPI, getMaxFreq(F, BFI)); in run() 146 auto *BFI = &getAnalysis<BlockFrequencyInfoWrapperPass>().getBFI(); in runOnFunction() local 147 viewCFG(F, BFI, BPI, getMaxFreq(F, BFI), /*CFGOnly=*/true); in runOnFunction() [all …]
|
| D | ProfileSummaryInfo.cpp | 80 const CallBase &Call, BlockFrequencyInfo *BFI, bool AllowSynthetic) const { in getProfileCount() argument 93 if (BFI) in getProfileCount() 94 return BFI->getBlockProfileCount(Call.getParent(), AllowSynthetic); in getProfileCount() 117 const Function *F, BlockFrequencyInfo &BFI) const { in isFunctionHotInCallGraph() 135 if (isHotBlock(&BB, &BFI)) in isFunctionHotInCallGraph() 146 const Function *F, BlockFrequencyInfo &BFI) const { in isFunctionColdInCallGraph() 164 if (!isColdBlock(&BB, &BFI)) in isFunctionColdInCallGraph() 176 int PercentileCutoff, const Function *F, BlockFrequencyInfo &BFI) const { in isFunctionHotOrColdInCallGraphNthPercentile() 200 if (isHot && isHotBlockNthPercentile(PercentileCutoff, &BB, &BFI)) in isFunctionHotOrColdInCallGraphNthPercentile() 202 if (!isHot && !isColdBlockNthPercentile(PercentileCutoff, &BB, &BFI)) in isFunctionHotOrColdInCallGraphNthPercentile() [all …]
|
| D | OptimizationRemarkEmitter.cpp | 28 : F(F), BFI(nullptr) { in OptimizationRemarkEmitter() 45 BFI = OwnedBFI.get(); in OptimizationRemarkEmitter() 53 BFI = nullptr; in invalidate() 57 if (BFI && Inv.invalidate<BlockFrequencyAnalysis>(F, PA)) in invalidate() 66 if (!BFI) in computeHotness() 69 return BFI->getBlockProfileCount(cast<BasicBlock>(V)); in computeHotness() 100 BlockFrequencyInfo *BFI; in runOnFunction() local 104 BFI = &getAnalysis<LazyBlockFrequencyInfoPass>().getBFI(); in runOnFunction() 113 BFI = nullptr; in runOnFunction() 115 ORE = std::make_unique<OptimizationRemarkEmitter>(&Fn, BFI); in runOnFunction() [all …]
|
| D | BlockFrequencyInfoImpl.cpp | 303 static void cleanup(BlockFrequencyInfoImplBase &BFI) { in cleanup() argument 304 std::vector<FrequencyData> SavedFreqs(std::move(BFI.Freqs)); in cleanup() 305 SparseBitVector<> SavedIsIrrLoopHeader(std::move(BFI.IsIrrLoopHeader)); in cleanup() 306 BFI.clear(); in cleanup() 307 BFI.Freqs = std::move(SavedFreqs); in cleanup() 308 BFI.IsIrrLoopHeader = std::move(SavedIsIrrLoopHeader); in cleanup() 434 static void debugAssign(const BlockFrequencyInfoImplBase &BFI, in debugAssign() argument 441 dbgs() << " to " << BFI.getBlockName(T); in debugAssign() 481 static void convertFloatingToInteger(BlockFrequencyInfoImplBase &BFI, in convertFloatingToInteger() argument 507 for (size_t Index = 0; Index < BFI.Freqs.size(); ++Index) { in convertFloatingToInteger() [all …]
|
| D | HeatUtils.cpp | 53 uint64_t getMaxFreq(const Function &F, const BlockFrequencyInfo *BFI) { in getMaxFreq() argument 56 uint64_t freqVal = BFI->getBlockFreq(&BB).getFrequency(); in getMaxFreq()
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/Utils/ |
| D | SizeOpts.cpp | 64 BlockFrequencyInfo &BFI) { in isFunctionColdInCallGraph() 65 return PSI->isFunctionColdInCallGraph(F, BFI); in isFunctionColdInCallGraph() 70 BlockFrequencyInfo &BFI) { in isFunctionHotInCallGraphNthPercentile() 71 return PSI->isFunctionHotInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionHotInCallGraphNthPercentile() 76 BlockFrequencyInfo &BFI) { in isFunctionColdInCallGraphNthPercentile() 77 return PSI->isFunctionColdInCallGraphNthPercentile(CutOff, F, BFI); in isFunctionColdInCallGraphNthPercentile() 81 BlockFrequencyInfo *BFI) { in isColdBlock() 82 return PSI->isColdBlock(BB, BFI); in isColdBlock() 87 BlockFrequencyInfo *BFI) { in isHotBlockNthPercentile() 88 return PSI->isHotBlockNthPercentile(CutOff, BB, BFI); in isHotBlockNthPercentile() [all …]
|
| D | BreakCriticalEdges.cpp | 341 BlockFrequencyInfo *BFI) { in SplitIndirectBrCriticalEdges() argument 358 bool ShouldUpdateAnalysis = BPI && BFI; in SplitIndirectBrCriticalEdges() 390 BFI->setBlockFreq(BodyBlock, BFI->getBlockFreq(Target).getFrequency()); in SplitIndirectBrCriticalEdges() 410 BlockFreqForDirectSucc += BFI->getBlockFreq(Src) * in SplitIndirectBrCriticalEdges() 414 BFI->setBlockFreq(DirectSucc, BlockFreqForDirectSucc.getFrequency()); in SplitIndirectBrCriticalEdges() 416 BFI->getBlockFreq(Target) - BlockFreqForDirectSucc; in SplitIndirectBrCriticalEdges() 417 BFI->setBlockFreq(Target, NewBlockFreqForTarget.getFrequency()); in SplitIndirectBrCriticalEdges()
|
| /openbsd/src/gnu/llvm/llvm/include/llvm/Transforms/Utils/ |
| D | SizeOpts.h | 52 BFIT *BFI, PGSOQueryType QueryType) { in shouldFuncOptimizeForSizeImpl() argument 54 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldFuncOptimizeForSizeImpl() 61 return AdapterT::isFunctionColdInCallGraph(F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 66 PgsoCutoffSampleProf, F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 68 F, PSI, *BFI); in shouldFuncOptimizeForSizeImpl() 73 BFIT *BFI, PGSOQueryType QueryType) { in shouldOptimizeForSizeImpl() argument 74 if (!PSI || !BFI || !PSI->hasProfileSummary()) in shouldOptimizeForSizeImpl() 81 return AdapterT::isColdBlock(BBOrBlockFreq, PSI, BFI); in shouldOptimizeForSizeImpl() 86 BBOrBlockFreq, PSI, BFI); in shouldOptimizeForSizeImpl() 88 PSI, BFI); in shouldOptimizeForSizeImpl() [all …]
|
| D | CodeExtractor.h | 91 BlockFrequencyInfo *BFI; variable 132 bool AggregateArgs = false, BlockFrequencyInfo *BFI = nullptr, 144 BlockFrequencyInfo *BFI = nullptr,
|
| /openbsd/src/gnu/llvm/llvm/include/llvm/Analysis/ |
| D | ProfileSummaryInfo.h | 102 BlockFrequencyInfo *BFI, 114 BlockFrequencyInfo &BFI) const; 119 BlockFrequencyInfo &BFI) const; 126 BlockFrequencyInfo &BFI) const; 131 BlockFrequencyInfo &BFI) const; 147 bool isHotBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) const; 149 bool isColdBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) const; 155 BlockFrequencyInfo *BFI) const; 161 BlockFrequencyInfo *BFI) const; 163 bool isHotCallSite(const CallBase &CB, BlockFrequencyInfo *BFI) const; [all …]
|
| D | OptimizationRemarkEmitter.h | 35 OptimizationRemarkEmitter(const Function *F, BlockFrequencyInfo *BFI) in OptimizationRemarkEmitter() argument 36 : F(F), BFI(BFI) {} in OptimizationRemarkEmitter() 52 : F(Arg.F), BFI(Arg.BFI) {} in OptimizationRemarkEmitter() 56 BFI = RHS.BFI; 112 BlockFrequencyInfo *BFI; variable 126 bool shouldEmitVerbose() { return BFI != nullptr; } in shouldEmitVerbose()
|
| D | LazyBlockFrequencyInfo.h | 50 BFI.calculate( in getCalculated() 54 return BFI; in getCalculated() 62 BFI.releaseMemory(); in releaseMemory() 68 BlockFrequencyInfoT BFI;
|
| D | BlockFrequencyInfo.h | 40 std::unique_ptr<ImplType> BFI; variable 139 BlockFrequencyInfo BFI; variable 147 BlockFrequencyInfo &getBFI() { return BFI; } in getBFI() 148 const BlockFrequencyInfo &getBFI() const { return BFI; } in getBFI()
|
| D | CFGPrinter.h | 58 const BlockFrequencyInfo *BFI; variable 68 DOTFuncInfo(const Function *F, const BlockFrequencyInfo *BFI, in DOTFuncInfo() argument 70 : F(F), BFI(BFI), BPI(BPI), MaxFreq(MaxFreq) { in DOTFuncInfo() 73 RawWeights = !!BFI; // Print RawWeights when BFI is available. in DOTFuncInfo() 76 const BlockFrequencyInfo *getBFI() const { return BFI; } in getBFI() 85 return BFI->getBlockFreq(BB).getFrequency(); in getFreq()
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/Scalar/ |
| D | LoopSink.cpp | 81 BlockFrequencyInfo &BFI) { in adjustedSumFreq() argument 84 T += BFI.getBlockFreq(B); in adjustedSumFreq() 120 DominatorTree &DT, BlockFrequencyInfo &BFI) { in findBBsToSinkInto() argument 143 if (adjustedSumFreq(BBsDominatedByColdestBB, BFI) > in findBBsToSinkInto() 144 BFI.getBlockFreq(ColdestBB)) { in findBBsToSinkInto() 162 if (adjustedSumFreq(BBsToSinkInto, BFI) > in findBBsToSinkInto() 163 BFI.getBlockFreq(L.getLoopPreheader())) in findBBsToSinkInto() 175 DominatorTree &DT, BlockFrequencyInfo &BFI, MemorySSAUpdater *MSSAU) { in sinkInstruction() argument 197 findBBsToSinkInto(L, BBs, ColdLoopBBs, DT, BFI); in sinkInstruction() 267 BlockFrequencyInfo &BFI, in sinkLoopInvariantInstructions() argument [all …]
|
| D | LoopLoadElimination.cpp | 165 DominatorTree *DT, BlockFrequencyInfo *BFI, in LoadEliminationForLoop() argument 167 : L(L), LI(LI), LAI(LAI), DT(DT), BFI(BFI), PSI(PSI), PSE(LAI.getPSE()) {} in LoadEliminationForLoop() 568 llvm::shouldOptimizeForSize(HeaderBB, PSI, BFI, in processLoop() 617 BlockFrequencyInfo *BFI; member in __anonb7d95a220311::LoadEliminationForLoop 626 BlockFrequencyInfo *BFI, in eliminateLoadsAcrossLoops() argument 653 LoadEliminationForLoop LEL(L, &LI, LAIs.getInfo(*L), &DT, BFI, PSI); in eliminateLoadsAcrossLoops() 681 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction() local 687 return eliminateLoadsAcrossLoops(F, LI, DT, BFI, PSI, SE, /*AC*/ nullptr, in runOnFunction() 737 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in run() local 741 bool Changed = eliminateLoadsAcrossLoops(F, LI, DT, BFI, PSI, &SE, &AC, LAIs); in run()
|
| D | ConstantHoisting.cpp | 212 static void findBestInsertionSet(DominatorTree &DT, BlockFrequencyInfo &BFI, in findBestInsertionSet() argument 281 if (InsertPtsFreq > BFI.getBlockFreq(Node) || in findBestInsertionSet() 282 (InsertPtsFreq == BFI.getBlockFreq(Node) && InsertPts.size() > 1)) in findBestInsertionSet() 302 (InsertPtsFreq > BFI.getBlockFreq(Node) || in findBestInsertionSet() 303 (InsertPtsFreq == BFI.getBlockFreq(Node) && InsertPts.size() > 1)))) { in findBestInsertionSet() 305 ParentPtsFreq += BFI.getBlockFreq(Node); in findBestInsertionSet() 329 if (BFI) { in findConstantInsertionPoint() 330 findBestInsertionSet(*DT, *BFI, Entry, BBs); in findConstantInsertionPoint() 579 llvm::shouldOptimizeForSize(Entry->getParent(), PSI, BFI, in maximizeConstantsInRange() 950 DominatorTree &DT, BlockFrequencyInfo *BFI, in runImpl() argument [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/Instrumentation/ |
| D | PGOMemOPSizeOpt.cpp | 177 MemOPSizeOpt(Function &Func, BlockFrequencyInfo &BFI, in MemOPSizeOpt() argument 180 : Func(Func), BFI(BFI), ORE(ORE), DT(DT), TLI(TLI), Changed(false) { in MemOPSizeOpt() 219 BlockFrequencyInfo &BFI; member in __anon963702ff0111::MemOPSizeOpt 264 auto BBEdgeCount = BFI.getBlockProfileCount(MO.I->getParent()); in perform() 373 auto OrigBBFreq = BFI.getBlockFreq(BB); in perform() 381 BFI.setBlockFreq(MergeBB, OrigBBFreq.getFrequency()); in perform() 459 static bool PGOMemOPSizeOptImpl(Function &F, BlockFrequencyInfo &BFI, in PGOMemOPSizeOptImpl() argument 467 MemOPSizeOpt MemOPSizeOpt(F, BFI, ORE, DT, TLI); in PGOMemOPSizeOptImpl() 474 auto &BFI = FAM.getResult<BlockFrequencyAnalysis>(F); in run() local 478 bool Changed = PGOMemOPSizeOptImpl(F, BFI, ORE, DT, TLI); in run()
|
| D | CFGMST.h | 104 uint64_t EntryWeight = (BFI != nullptr ? BFI->getEntryFreq() : 2); in buildEdges() 128 (BFI != nullptr ? BFI->getBlockFreq(&BB).getFrequency() : 2); in buildEdges() 279 BlockFrequencyInfo *BFI; variable 288 : F(Func), BPI(BPI_), BFI(BFI_), in F()
|
| D | CGProfile.cpp | 72 auto &BFI = GetBFI(F); in runCGProfilePass() local 73 if (BFI.getEntryFreq() == 0) in runCGProfilePass() 77 std::optional<uint64_t> BBCount = BFI.getBlockProfileCount(&BB); in runCGProfilePass()
|
| /openbsd/src/gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/ |
| D | InstructionSelector.h | 448 BlockFrequencyInfo *BFI = nullptr; variable 464 BFI = bfi; in setupMF() 491 (PSI && BFI && CurMBB && llvm::shouldOptForSize(*CurMBB, PSI, BFI)); in shouldOptForSize()
|
| /openbsd/src/gnu/llvm/llvm/lib/Transforms/IPO/ |
| D | SyntheticCountsPropagation.cpp | 109 auto &BFI = FAM.getResult<BlockFrequencyAnalysis>(*Caller); in run() local 114 Scaled64 EntryFreq(BFI.getEntryFreq(), 0); in run() 115 Scaled64 BBCount(BFI.getBlockFreq(CSBB).getFrequency(), 0); in run()
|
| /openbsd/src/gnu/llvm/llvm/include/llvm/Transforms/Vectorize/ |
| D | LoopVectorizationLegality.h | 248 AssumptionCache *AC, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI) in LoopVectorizationLegality() argument 250 ORE(ORE), Requirements(R), Hints(H), DB(DB), AC(AC), BFI(BFI), in LoopVectorizationLegality() 552 BlockFrequencyInfo *BFI; variable
|
| /openbsd/src/gnu/llvm/llvm/lib/CodeGen/ |
| D | ExpandMemCmp.cpp | 743 ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI, in expandMemCmp() argument 767 llvm::shouldOptimizeForSize(CI->getParent(), PSI, BFI); in expandMemCmp() 824 auto *BFI = (PSI && PSI->hasProfileSummary()) ? in runOnFunction() local 830 auto PA = runImpl(F, TLI, TTI, TL, PSI, BFI, DT); in runOnFunction() 847 BlockFrequencyInfo *BFI, DominatorTree *DT); 852 BlockFrequencyInfo *BFI, DomTreeUpdater *DTU); 859 BlockFrequencyInfo *BFI, in runOnBlock() argument 869 expandMemCmp(CI, TTI, TL, &DL, PSI, BFI, DTU, Func == LibFunc_bcmp)) { in runOnBlock() 880 BlockFrequencyInfo *BFI, DominatorTree *DT) { in runImpl() argument 888 if (runOnBlock(*BBIt, TLI, TTI, TL, DL, PSI, BFI, DTU ? &*DTU : nullptr)) { in runImpl()
|