Lines Matching defs:MF
122 bool runOnMachineFunction(MachineFunction &MF) override;
125 bool handleBBSections(MachineFunction &MF);
126 bool handleBBAddrMap(MachineFunction &MF);
146 updateBranches(MachineFunction &MF,
148 const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
150 for (auto &MBB : MF) {
188 assignSections(MachineFunction &MF,
190 assert(MF.hasBBSections() && "BB Sections is not set for function.");
196 for (auto &MBB : MF) {
201 if (MF.getTarget().getBBSectionsType() == llvm::BasicBlockSection::All ||
237 for (auto &MBB : MF)
243 MachineFunction &MF, MachineBasicBlockComparator MBBCmp) {
244 [[maybe_unused]] const MachineBasicBlock *EntryBlock = &MF.front();
245 SmallVector<MachineBasicBlock *> PreLayoutFallThroughs(MF.getNumBlockIDs());
246 for (auto &MBB : MF)
250 MF.sort(MBBCmp);
251 assert(&MF.front() == EntryBlock &&
255 MF.assignBeginEndSections();
260 updateBranches(MF, PreLayoutFallThroughs);
267 void llvm::avoidZeroOffsetLandingPad(MachineFunction &MF) {
268 for (auto &MBB : MF) {
273 MF.getSubtarget().getInstrInfo()->insertNoop(MBB, MI);
278 bool llvm::hasInstrProfHashMismatch(MachineFunction &MF) {
283 auto *Existing = MF.getFunction().getMetadata(LLVMContext::MD_annotation);
296 bool BasicBlockSections::handleBBSections(MachineFunction &MF) {
297 auto BBSectionsType = MF.getTarget().getBBSectionsType();
308 hasInstrProfHashMismatch(MF))
312 MF.RenumberBlocks();
318 .getClusterInfoForFunction(MF.getName());
326 MF.setBBSectionsType(BBSectionsType);
327 assignSections(MF, FuncClusterInfo);
329 const MachineBasicBlock &EntryBB = MF.front();
370 sortBasicBlocksAndUpdateBranches(MF, Comparator);
371 avoidZeroOffsetLandingPad(MF);
379 bool BasicBlockSections::handleBBAddrMap(MachineFunction &MF) {
380 if (!MF.getTarget().Options.BBAddrMap)
382 MF.RenumberBlocks();
386 bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) {
388 auto R1 = handleBBSections(MF);
390 auto R2 = handleBBAddrMap(MF);