Lines Matching refs:MF
59 bool runOnMachineFunction(MachineFunction &MF) override;
72 static void EliminateMultipleEntryLoops(MachineFunction &MF, in EliminateMultipleEntryLoops() argument
75 for (scc_iterator<MachineFunction *> I = scc_begin(&MF), E = scc_end(&MF); in EliminateMultipleEntryLoops()
109 POStackEntry(MachineBasicBlock *MBB, MachineFunction &MF,
119 POStackEntry::POStackEntry(MachineBasicBlock *MBB, MachineFunction &MF, in POStackEntry() argument
127 MachineBasicBlock *LayoutSucc = Next == MF.end() ? nullptr : &*Next; in POStackEntry()
173 static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) { in SortBlocks() argument
181 MachineBasicBlock *EntryBlock = &*MF.begin(); in SortBlocks()
183 Stack.push_back(POStackEntry(EntryBlock, MF, MLI)); in SortBlocks()
191 Stack.push_back(POStackEntry(Succ, MF, MLI)); in SortBlocks()
197 MBB.moveBefore(&*MF.begin()); in SortBlocks()
214 MF.RenumberBlocks(); in SortBlocks()
224 for (auto &MBB : MF) { in SortBlocks()
268 static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF, in PlaceBlockMarker() argument
290 assert(&MBB != &MF.front() && "Header blocks shouldn't have predecessors"); in PlaceBlockMarker()
343 static void PlaceLoopMarker(MachineBasicBlock &MBB, MachineFunction &MF, in PlaceLoopMarker() argument
355 if (Iter == MF.end()) { in PlaceLoopMarker()
356 MachineBasicBlock *Label = MF.CreateMachineBasicBlock(); in PlaceLoopMarker()
359 MF.push_back(Label); in PlaceLoopMarker()
380 static void PlaceMarkers(MachineFunction &MF, const MachineLoopInfo &MLI, in PlaceMarkers() argument
388 SmallVector<MachineBasicBlock *, 8> ScopeTops(MF.getNumBlockIDs() + 1); in PlaceMarkers()
390 for (auto &MBB : MF) { in PlaceMarkers()
392 PlaceLoopMarker(MBB, MF, ScopeTops, TII, MLI); in PlaceMarkers()
395 PlaceBlockMarker(MBB, MF, ScopeTops, TII, MLI, MDT); in PlaceMarkers()
410 bool WebAssemblyCFGStackify::runOnMachineFunction(MachineFunction &MF) { in runOnMachineFunction() argument
413 << MF.getName() << '\n'); in runOnMachineFunction()
417 const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo(); in runOnMachineFunction()
420 EliminateMultipleEntryLoops(MF, MLI); in runOnMachineFunction()
423 SortBlocks(MF, MLI); in runOnMachineFunction()
426 PlaceMarkers(MF, MLI, TII, MDT); in runOnMachineFunction()
433 for (auto &MBB : MF) { in runOnMachineFunction()