Lines Matching defs:MF

120   bool runOnMachineFunction(MachineFunction &MF) override;
123 bool handleBBSections(MachineFunction &MF);
124 bool handleBBAddrMap(MachineFunction &MF);
144 updateBranches(MachineFunction &MF,
146 const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
148 for (auto &MBB : MF) {
186 assignSections(MachineFunction &MF,
188 assert(MF.hasBBSections() && "BB Sections is not set for function.");
194 for (auto &MBB : MF) {
199 if (MF.getTarget().getBBSectionsType() == llvm::BasicBlockSection::All ||
235 for (auto &MBB : MF)
241 MachineFunction &MF, MachineBasicBlockComparator MBBCmp) {
242 [[maybe_unused]] const MachineBasicBlock *EntryBlock = &MF.front();
243 SmallVector<MachineBasicBlock *> PreLayoutFallThroughs(MF.getNumBlockIDs());
244 for (auto &MBB : MF)
248 MF.sort(MBBCmp);
249 assert(&MF.front() == EntryBlock &&
253 MF.assignBeginEndSections();
258 updateBranches(MF, PreLayoutFallThroughs);
265 void llvm::avoidZeroOffsetLandingPad(MachineFunction &MF) {
266 for (auto &MBB : MF) {
271 MF.getSubtarget().getInstrInfo()->insertNoop(MBB, MI);
276 bool llvm::hasInstrProfHashMismatch(MachineFunction &MF) {
281 auto *Existing = MF.getFunction().getMetadata(LLVMContext::MD_annotation);
294 bool BasicBlockSections::handleBBSections(MachineFunction &MF) {
295 auto BBSectionsType = MF.getTarget().getBBSectionsType();
306 hasInstrProfHashMismatch(MF))
310 MF.RenumberBlocks();
313 MF.setBBSectionsType(BBSectionsType);
321 .getClusterInfoForFunction(MF.getName());
329 MF.setBBSectionsType(BBSectionsType);
330 assignSections(MF, FuncClusterInfo);
332 const MachineBasicBlock &EntryBB = MF.front();
373 sortBasicBlocksAndUpdateBranches(MF, Comparator);
374 avoidZeroOffsetLandingPad(MF);
382 bool BasicBlockSections::handleBBAddrMap(MachineFunction &MF) {
383 if (MF.getTarget().getBBSectionsType() == BasicBlockSection::Labels)
385 if (!MF.getTarget().Options.BBAddrMap)
387 MF.RenumberBlocks();
391 bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) {
393 auto R1 = handleBBSections(MF);
395 auto R2 = handleBBAddrMap(MF);