Home
last modified time | relevance | path

Searched refs:MBFI (Results 1 – 25 of 54) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DMachineBlockFrequencyInfo.cpp156 const MachineBlockFrequencyInfo *MBFI) { in getEdgeAttributes()
158 Node, EI, MBFI, MBFI->getMBPI(), ViewHotFreqPercent); in getEdgeAttributes()
177 auto &MBFI = MFAM.getResult<MachineBlockFrequencyAnalysis>(MF); in run() local
180 MBFI.print(OS); in run()
234 if (!MBFI) in calculate()
235 MBFI.reset(new ImplType); in calculate()
236 MBFI->calculate(F, MBPI, MLI); in calculate()
243 MBFI->print(dbgs()); in calculate()
252 MBFI.calculate(F, MBPI, MLI); in runOnMachineFunction()
256 void MachineBlockFrequencyInfo::print(raw_ostream &OS) { MBFI->print(OS); } in print()
[all …]
H A DMachineOptimizationRemarkEmitter.cpp39 return MBFI && Inv.invalidate<MachineBlockFrequencyAnalysis>(MF, PA); in invalidate()
44 if (!MBFI) in computeHotness()
47 return MBFI->getBlockProfileCount(&MBB); in computeHotness()
79 MachineBlockFrequencyInfo *MBFI; in runOnMachineFunction() local
82 MBFI = &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI(); in runOnMachineFunction()
84 MBFI = nullptr; in runOnMachineFunction()
86 ORE = std::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI); in runOnMachineFunction()
102 MachineBlockFrequencyInfo *MBFI = in run() local
106 return Result(MF, MBFI); in run()
H A DMBFIWrapper.cpp26 return MBFI.getBlockFreq(MBB); in getBlockFreq()
41 return MBFI.getProfileCountFromFreq(I->second); in getBlockProfileCount()
43 return MBFI.getBlockProfileCount(MBB); in getBlockProfileCount()
47 MBFI.view(Name, isSimple); in printBlockFreq()
50 BlockFrequency MBFIWrapper::getEntryFreq() const { return MBFI.getEntryFreq(); }
H A DTailDuplication.cpp92 auto *MBFI = (PSI && PSI->hasProfileSummary()) ? in runOnMachineFunction() local
95 if (MBFI) in runOnMachineFunction()
96 MBFIW = std::make_unique<MBFIWrapper>(*MBFI); in runOnMachineFunction()
97 Duplicator.initMF(MF, PreRegAlloc, MBPI, MBFI ? MBFIW.get() : nullptr, PSI, in runOnMachineFunction()
116 auto *MBFI = (PSI && PSI->hasProfileSummary() in run() local
119 if (MBFI) in run()
120 MBFIW = std::make_unique<MBFIWrapper>(*MBFI); in run()
123 Duplicator.initMF(MF, PreRegAlloc, MBPI, MBFI ? MBFIW.get() : nullptr, PSI, in run()
H A DMachineFunctionSplitter.cpp109 const MachineBlockFrequencyInfo *MBFI, in isColdBlock() argument
111 std::optional<uint64_t> Count = MBFI->getBlockProfileCount(&MBB); in isColdBlock()
161 MachineBlockFrequencyInfo *MBFI = nullptr; in runOnMachineFunction() local
164 MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(); in runOnMachineFunction()
170 if (PSI->hasSampleProfile() && !PSI->isFunctionHotInCallGraph(&MF, *MBFI)) { in runOnMachineFunction()
186 else if (UseProfileData && isColdBlock(MBB, MBFI, PSI) && in runOnMachineFunction()
199 if (!isColdBlock(*LP, MBFI, PSI) || !TII.isMBBSafeToSplitToCold(*LP)) in runOnMachineFunction()
H A DSpillPlacement.cpp194 auto *MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(); in runOnMachineFunction() local
196 Impl.run(MF, Bundles, MBFI); in runOnMachineFunction()
206 auto *MBFI = &MFAM.getResult<MachineBlockFrequencyAnalysis>(MF); in run() local
208 Impl.run(MF, Bundles, MBFI); in run()
233 MachineBlockFrequencyInfo *MBFI) { in run() argument
236 this->MBFI = MBFI; in run()
245 setThreshold(MBFI->getEntryFreq()); in run()
248 BlockFrequencies[Num] = MBFI->getBlockFreq(&I); in run()
271 BlockFrequency BiasN = MBFI->getEntryFreq(); in activate()
H A DMachineSizeOpts.cpp29 const MachineBlockFrequencyInfo *MBFI, in shouldOptimizeForSize() argument
33 return shouldFuncOptimizeForSizeImpl(MF, PSI, MBFI, QueryType); in shouldOptimizeForSize()
38 const MachineBlockFrequencyInfo *MBFI, in shouldOptimizeForSize() argument
43 return shouldOptimizeForSizeImpl(MBB, PSI, MBFI, QueryType); in shouldOptimizeForSize()
H A DMachineBlockPlacement.cpp398 std::unique_ptr<MBFIWrapper> MBFI; member in __anon1d8a29ed0111::MachineBlockPlacement
470 auto Count = MBFI->getBlockProfileCount(BB); in getBlockCountOrFrequency()
476 return MBFI->getBlockFreq(BB); in getBlockCountOrFrequency()
625 std::unique_ptr<MBFIWrapper> MBFI, in MachineBlockPlacement() argument
627 : MBPI(MBPI), MBFI(std::move(MBFI)), MLI(MLI), MPDT(MPDT), PSI(PSI), in MachineBlockPlacement()
651 auto MBFI = std::make_unique<MBFIWrapper>( in runOnMachineFunction() local
661 return MachineBlockPlacement(MBPI, MLI, PSI, std::move(MBFI), MPDT, in runOnMachineFunction()
903 auto BBFreq = MBFI->getBlockFreq(BB); in isProfitableToTailDup()
904 auto SuccFreq = MBFI->getBlockFreq(Succ); in isProfitableToTailDup()
907 BlockFrequency EntryFreq = MBFI->getEntryFreq(); in isProfitableToTailDup()
[all …]
H A DShrinkWrap.cpp132 MachineBlockFrequencyInfo *MBFI = nullptr; member in __anon8a4a73dd0111::ShrinkWrapImpl
230 EntryFreq = MBFI->getEntryFreq(); in init()
249 MachineBlockFrequencyInfo *MBFI, MachineLoopInfo *MLI, in ShrinkWrapImpl() argument
251 : MDT(MDT), MPDT(MPDT), MBFI(MBFI), MLI(MLI), ORE(ORE) {} in ShrinkWrapImpl()
648 EntryFreq < MBFI->getBlockFreq(NewSave) || in postShrinkWrapping()
683 assert((EntryFreq >= MBFI->getBlockFreq(Save) && in postShrinkWrapping()
684 EntryFreq >= MBFI->getBlockFreq(Restore)) && in postShrinkWrapping()
894 << printBlockFreq(*MBFI, *Save) in performShrinkWrapping()
896 << printBlockFreq(*MBFI, *Restore) << '\n'); in performShrinkWrapping()
899 if (((IsSaveCheap = EntryFreq >= MBFI->getBlockFreq(Save)) && in performShrinkWrapping()
[all …]
H A DMIRSampleProfile.cpp151 MachineLoopInfo *MLI, MachineBlockFrequencyInfo *MBFI, in setInitVals() argument
156 BFI = MBFI; in setInitVals()
369 MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(); in runOnMachineFunction()
379 MDT, MPDT, &getAnalysis<MachineLoopInfoWrapperPass>().getLI(), MBFI, in runOnMachineFunction()
385 MBFI->view("MIR_Prof_loader_b." + MF.getName(), false); in runOnMachineFunction()
390 MBFI->calculate(MF, *MBFI->getMBPI(), in runOnMachineFunction()
396 MBFI->view("MIR_prof_loader_a." + MF.getName(), false); in runOnMachineFunction()
H A DStackSlotColoring.cpp68 const MachineBlockFrequencyInfo *MBFI = nullptr; member in __anonb7b65c290111::StackSlotColoring
145 MachineBlockFrequencyInfo *MBFI, SlotIndexes *Indexes) in StackSlotColoring() argument
147 MBFI(MBFI), Indexes(Indexes) {} in StackSlotColoring()
235 LiveIntervals::getSpillWeight(false, true, MBFI, MI)); in ScanForSpillSlotRefs()
572 MachineBlockFrequencyInfo *MBFI = in runOnMachineFunction() local
575 StackSlotColoring Impl(MF, LS, MBFI, Indexes); in runOnMachineFunction()
583 MachineBlockFrequencyInfo *MBFI = in run() local
586 StackSlotColoring Impl(MF, LS, MBFI, Indexes); in run()
H A DMLRegAllocEvictAdvisor.cpp297 MLModelRunner *Runner, const MachineBlockFrequencyInfo &MBFI,
358 const MachineBlockFrequencyInfo &MBFI; member in __anonb6cddc090111::MLEvictAdvisor
413 MachineBlockFrequencyInfo *MBFI, MachineLoopInfo *Loops) override { in getAdvisor() argument
424 assert(MBFI && Loops && in getAdvisor()
426 return std::make_unique<MLEvictAdvisor>(MF, RA, Runner.get(), *MBFI, in getAdvisor()
482 const MachineBlockFrequencyInfo &MBFI, in DevelopmentModeEvictAdvisor() argument
484 : MLEvictAdvisor(MF, RA, Runner, MBFI, Loops), Log(Log) {} in DevelopmentModeEvictAdvisor()
577 MachineBlockFrequencyInfo *MBFI, MachineLoopInfo *Loops) override { in getAdvisor() argument
582 assert(MBFI && Loops && in getAdvisor()
585 MF, RA, Runner.get(), *MBFI, *Loops, Log.get()); in getAdvisor()
[all …]
H A DStaticDataSplitter.cpp47 const MachineBlockFrequencyInfo *MBFI = nullptr; member in StaticDataSplitter
102 MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(); in runOnMachineFunction()
108 const bool ProfileAvailable = PSI && PSI->hasProfileSummary() && MBFI && in runOnMachineFunction()
174 std::optional<uint64_t> Count = MBFI->getBlockProfileCount(&MBB); in partitionStaticDataWithProfiles()
H A DMachineCSE.cpp79 MachineBlockFrequencyInfo *MBFI = nullptr; member in __anon86c74d640111::MachineCSEImpl
82 MachineCSEImpl(MachineDominatorTree *DT, MachineBlockFrequencyInfo *MBFI) in MachineCSEImpl() argument
83 : DT(DT), MBFI(MBFI) {} in MachineCSEImpl()
928 return MBFI->getBlockFreq(CandidateBB) <= in isProfitableToHoistInto()
929 MBFI->getBlockFreq(MBB) + MBFI->getBlockFreq(MBB1); in isProfitableToHoistInto()
955 MachineBlockFrequencyInfo &MBFI = in run() local
957 MachineCSEImpl Impl(&MDT, &MBFI); in run()
976 MachineBlockFrequencyInfo &MBFI = in runOnMachineFunction() local
978 MachineCSEImpl Impl(&MDT, &MBFI); in runOnMachineFunction()
H A DRegAllocPBQP.cpp436 MachineBlockFrequencyInfo &MBFI = G.getMetadata().MBFI; in apply() local
450 PBQP::PBQPNum CBenefit = MBFI.getBlockFreqRelativeToEntryBlock(&MBB); in apply()
528 const MachineBlockFrequencyInfo &MBFI) in PBQPVirtRegAuxInfo() argument
529 : VirtRegAuxInfo(MF, LIS, VRM, Loops, MBFI) {} in PBQPVirtRegAuxInfo()
792 MachineBlockFrequencyInfo &MBFI = in runOnMachineFunction() local
801 MF, LIS, VRM, getAnalysis<MachineLoopInfoWrapperPass>().getLI(), MBFI); in runOnMachineFunction()
809 MF, LIS, VRM, getAnalysis<MachineLoopInfoWrapperPass>().getLI(), MBFI); in runOnMachineFunction()
811 createInlineSpiller({LIS, LiveStks, MDT, MBFI}, MF, VRM, DefaultVRAI)); in runOnMachineFunction()
853 PBQPRAGraph G(PBQPRAGraph::GraphMetadata(MF, LIS, MBFI)); in runOnMachineFunction()
H A DMLRegallocEvictAdvisor.cpp
H A DRegAllocScore.cpp75 const MachineBlockFrequencyInfo &MBFI) { in calculateRegAllocScore() argument
79 return MBFI.getBlockFreqRelativeToEntryBlock(&MBB); in calculateRegAllocScore()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DMachineBlockFrequencyInfo.h37 std::unique_ptr<ImplType> MBFI; variable
106 LLVM_ABI Printable printBlockFreq(const MachineBlockFrequencyInfo &MBFI,
111 LLVM_ABI Printable printBlockFreq(const MachineBlockFrequencyInfo &MBFI,
142 MachineBlockFrequencyInfo MBFI; variable
153 void releaseMemory() override { MBFI.releaseMemory(); } in releaseMemory()
155 MachineBlockFrequencyInfo &getMBFI() { return MBFI; } in getMBFI()
157 const MachineBlockFrequencyInfo &getMBFI() const { return MBFI; } in getMBFI()
H A DCalcSpillWeights.h52 const MachineBlockFrequencyInfo &MBFI; variable
61 const MachineBlockFrequencyInfo &MBFI,
63 : MF(MF), LIS(LIS), VRM(VRM), Loops(Loops), PSI(PSI), MBFI(MBFI) {} in MF()
H A DMachineOptimizationRemarkEmitter.h157 MachineBlockFrequencyInfo *MBFI) in MachineOptimizationRemarkEmitter() argument
158 : MF(MF), MBFI(MBFI) {} in MachineOptimizationRemarkEmitter()
203 return MBFI; in getBFI()
210 MachineBlockFrequencyInfo *MBFI; variable
221 bool shouldEmitVerbose() { return MBFI != nullptr; } in shouldEmitVerbose()
H A DMBFIWrapper.h28 MBFIWrapper(const MachineBlockFrequencyInfo &I) : MBFI(I) {}
37 const MachineBlockFrequencyInfo &getMBFI() const { return MBFI; }
40 const MachineBlockFrequencyInfo &MBFI;
H A DSpillPlacement.h53 const MachineBlockFrequencyInfo *MBFI = nullptr; variable
172 MachineBlockFrequencyInfo *MBFI);
H A DTailDuplicator.h45 MBFIWrapper *MBFI; variable
72 MBFIWrapper *MBFI,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DRegBankSelect.cpp88 MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(); in init()
91 MBFI = nullptr; in init()
95 MORE = std::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI); in init()
447 assert((MBFI || !BestCost) && "Costs comparison require MBFI"); in computeMapping()
453 MappingCost Cost(MBFI ? MBFI->getBlockFreq(MI.getParent()) in computeMapping()
522 assert(MBFI && MBPI && "Cost computation requires MBFI and MBPI"); in computeMapping()
954 const auto *MBFI = &MBFIWrapper->getMBFI(); in frequency() local
956 return MBFI->getBlockFreq(DstOrSplit).getFrequency(); in frequency()
965 return (MBFI->getBlockFreq(&Src) * MBPI->getEdgeProbability(&Src, DstOrSplit)) in frequency()
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyRegColoring.cpp66 const MachineBlockFrequencyInfo *MBFI, in computeWeight() argument
70 Weight += LiveIntervals::getSpillWeight(MO.isDef(), MO.isUse(), MBFI, in computeWeight()
235 const MachineBlockFrequencyInfo *MBFI = in runOnMachineFunction() local
261 LI->setWeight(computeWeight(MRI, MBFI, VReg)); in runOnMachineFunction()

123