Lines Matching refs:MF

120   bool runOnMachineFunction(MachineFunction &MF) override;
140 updateBranches(MachineFunction &MF, in INITIALIZE_PASS_DEPENDENCY()
142 const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); in INITIALIZE_PASS_DEPENDENCY()
144 for (auto &MBB : MF) { in INITIALIZE_PASS_DEPENDENCY()
182 assignSections(MachineFunction &MF, in assignSections() argument
184 assert(MF.hasBBSections() && "BB Sections is not set for function."); in assignSections()
190 for (auto &MBB : MF) { in assignSections()
195 if (MF.getTarget().getBBSectionsType() == llvm::BasicBlockSection::All || in assignSections()
226 for (auto &MBB : MF) in assignSections()
232 MachineFunction &MF, MachineBasicBlockComparator MBBCmp) { in sortBasicBlocksAndUpdateBranches() argument
233 [[maybe_unused]] const MachineBasicBlock *EntryBlock = &MF.front(); in sortBasicBlocksAndUpdateBranches()
234 SmallVector<MachineBasicBlock *> PreLayoutFallThroughs(MF.getNumBlockIDs()); in sortBasicBlocksAndUpdateBranches()
235 for (auto &MBB : MF) in sortBasicBlocksAndUpdateBranches()
239 MF.sort(MBBCmp); in sortBasicBlocksAndUpdateBranches()
240 assert(&MF.front() == EntryBlock && in sortBasicBlocksAndUpdateBranches()
244 MF.assignBeginEndSections(); in sortBasicBlocksAndUpdateBranches()
249 updateBranches(MF, PreLayoutFallThroughs); in sortBasicBlocksAndUpdateBranches()
256 void llvm::avoidZeroOffsetLandingPad(MachineFunction &MF) { in avoidZeroOffsetLandingPad() argument
257 for (auto &MBB : MF) { in avoidZeroOffsetLandingPad()
262 MF.getSubtarget().getInstrInfo()->insertNoop(MBB, MI); in avoidZeroOffsetLandingPad()
267 bool llvm::hasInstrProfHashMismatch(MachineFunction &MF) { in hasInstrProfHashMismatch() argument
272 auto *Existing = MF.getFunction().getMetadata(LLVMContext::MD_annotation); in hasInstrProfHashMismatch()
283 bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) { in runOnMachineFunction() argument
284 auto BBSectionsType = MF.getTarget().getBBSectionsType(); in runOnMachineFunction()
295 hasInstrProfHashMismatch(MF)) in runOnMachineFunction()
299 MF.RenumberBlocks(); in runOnMachineFunction()
302 MF.setBBSectionsType(BBSectionsType); in runOnMachineFunction()
310 .getClusterInfoForFunction(MF.getName()); in runOnMachineFunction()
318 MF.setBBSectionsType(BBSectionsType); in runOnMachineFunction()
319 assignSections(MF, FuncClusterInfo); in runOnMachineFunction()
321 const MachineBasicBlock &EntryBB = MF.front(); in runOnMachineFunction()
362 sortBasicBlocksAndUpdateBranches(MF, Comparator); in runOnMachineFunction()
363 avoidZeroOffsetLandingPad(MF); in runOnMachineFunction()