Lines Matching refs:MF
120 bool runOnMachineFunction(MachineFunction &MF) override;
134 MachineFunction &MF, in updateBranches() argument
136 const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); in updateBranches()
138 for (auto &MBB : MF) { in updateBranches()
168 const MachineFunction &MF, in getBBClusterInfoForFunction() argument
174 BBSectionsProfileReader->getBBClusterInfoForFunction(MF.getName()); in getBBClusterInfoForFunction()
185 V.resize(MF.getNumBlockIDs()); in getBBClusterInfoForFunction()
188 if (bbClusterInfo.MBBNumber >= MF.getNumBlockIDs()) in getBBClusterInfoForFunction()
205 assignSections(MachineFunction &MF, in assignSections() argument
207 assert(MF.hasBBSections() && "BB Sections is not set for function."); in assignSections()
213 for (auto &MBB : MF) { in assignSections()
218 if (MF.getTarget().getBBSectionsType() == llvm::BasicBlockSection::All || in assignSections()
245 for (auto &MBB : MF) in assignSections()
251 MachineFunction &MF, MachineBasicBlockComparator MBBCmp) { in sortBasicBlocksAndUpdateBranches() argument
253 MF.getNumBlockIDs()); in sortBasicBlocksAndUpdateBranches()
254 for (auto &MBB : MF) in sortBasicBlocksAndUpdateBranches()
257 MF.sort(MBBCmp); in sortBasicBlocksAndUpdateBranches()
260 MF.assignBeginEndSections(); in sortBasicBlocksAndUpdateBranches()
265 updateBranches(MF, PreLayoutFallThroughs); in sortBasicBlocksAndUpdateBranches()
272 void llvm::avoidZeroOffsetLandingPad(MachineFunction &MF) { in avoidZeroOffsetLandingPad() argument
273 for (auto &MBB : MF) { in avoidZeroOffsetLandingPad()
278 MCInst Nop = MF.getSubtarget().getInstrInfo()->getNop(); in avoidZeroOffsetLandingPad()
280 MF.getSubtarget().getInstrInfo()->get(Nop.getOpcode())); in avoidZeroOffsetLandingPad()
290 static bool hasInstrProfHashMismatch(MachineFunction &MF) { in hasInstrProfHashMismatch() argument
295 auto *Existing = MF.getFunction().getMetadata(LLVMContext::MD_annotation); in hasInstrProfHashMismatch()
306 bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) { in runOnMachineFunction() argument
307 auto BBSectionsType = MF.getTarget().getBBSectionsType(); in runOnMachineFunction()
318 hasInstrProfHashMismatch(MF)) in runOnMachineFunction()
325 MF.RenumberBlocks(); in runOnMachineFunction()
328 MF.setBBSectionsType(BBSectionsType); in runOnMachineFunction()
336 !getBBClusterInfoForFunction(MF, BBSectionsProfileReader, in runOnMachineFunction()
339 MF.setBBSectionsType(BBSectionsType); in runOnMachineFunction()
340 assignSections(MF, FuncBBClusterInfo); in runOnMachineFunction()
344 auto EntryBBSectionID = MF.front().getSectionID(); in runOnMachineFunction()
379 sortBasicBlocksAndUpdateBranches(MF, Comparator); in runOnMachineFunction()
380 avoidZeroOffsetLandingPad(MF); in runOnMachineFunction()