Lines Matching refs:MII
675 MachineBasicBlock::iterator &MII, in ReMaterialize() argument
686 TII->reMaterialize(MBB, MII, DestReg, 0, ReMatDefMI, *TRI); in ReMaterialize()
687 MachineInstr *NewMI = prior(MII); in ReMaterialize()
1020 static unsigned FindFreeRegister(MachineBasicBlock::iterator MII, in FindFreeRegister() argument
1033 if (MII == MBB.begin()) in FindFreeRegister()
1035 MachineInstr *PrevMI = prior(MII); in FindFreeRegister()
1036 MII = PrevMI; in FindFreeRegister()
1123 MachineBasicBlock::iterator &MII,
1129 bool OptimizeByUnfold(MachineBasicBlock::iterator &MII,
1135 bool CommuteToFoldReload(MachineBasicBlock::iterator &MII,
1142 void SpillRegToStackSlot(MachineBasicBlock::iterator &MII,
1276 MachineBasicBlock::iterator &MII, in OptimizeByUnfold2() argument
1282 MachineBasicBlock::iterator NextMII = llvm::next(MII); in OptimizeByUnfold2()
1289 if (TII->getOpcodeAfterMemoryUnfold(MII->getOpcode(), true, true) == 0) in OptimizeByUnfold2()
1295 unsigned PhysReg = FindFreeRegister(MII, *MBB, RC, TRI, AllocatableRegs); in OptimizeByUnfold2()
1301 MachineInstr &MI = *MII; in OptimizeByUnfold2()
1312 ComputeReloadLoc(MII, MBB->begin(), PhysReg, TRI, false, SS, TII, MF); in OptimizeByUnfold2()
1315 TII->loadRegFromStackSlot(*MBB, MII, PhysReg, SS, RC, TRI); in OptimizeByUnfold2()
1329 MII = MBB->insert(MII, NewMIs[0]); in OptimizeByUnfold2()
1377 OptimizeByUnfold(MachineBasicBlock::iterator &MII, in OptimizeByUnfold() argument
1383 MachineInstr &MI = *MII; in OptimizeByUnfold()
1419 return OptimizeByUnfold2(UnfoldVR, FoldedSS, MII, MaybeDeadStores, Spills, in OptimizeByUnfold()
1458 MBB->insert(MII, NewMI); in OptimizeByUnfold()
1471 MII = FoldedMI; in OptimizeByUnfold()
1518 CommuteToFoldReload(MachineBasicBlock::iterator &MII, in CommuteToFoldReload() argument
1524 if (MII == MBB->begin() || !MII->killsRegister(SrcReg)) in CommuteToFoldReload()
1527 MachineInstr &MI = *MII; in CommuteToFoldReload()
1528 MachineBasicBlock::iterator DefMII = prior(MII); in CommuteToFoldReload()
1557 MBB->insert(MII, CommutedMI); in CommuteToFoldReload()
1571 MII = prior(MII); in CommuteToFoldReload()
1572 MachineInstr *StoreMI = MII; in CommuteToFoldReload()
1575 MII = FoldedMI; // Update MII to backtrack. in CommuteToFoldReload()
1600 SpillRegToStackSlot(MachineBasicBlock::iterator &MII, in SpillRegToStackSlot() argument
1609 MachineBasicBlock::iterator oldNextMII = llvm::next(MII); in SpillRegToStackSlot()
1610 TII->storeRegToStackSlot(*MBB, llvm::next(MII), PhysReg, true, StackSlot, RC, in SpillRegToStackSlot()
1633 if (InvalidateRegDef(PrevMII, *MII, KillRegs[j], HasOtherDef, TRI)) { in SpillRegToStackSlot()
1748 MachineBasicBlock::iterator MII = MI; in InsertEmergencySpills() local
1759 TII->storeRegToStackSlot(*MBB, MII, PhysReg, true, SS, RC, TRI); in InsertEmergencySpills()
1760 MachineInstr *StoreMI = prior(MII); in InsertEmergencySpills()
1765 ComputeReloadLoc(llvm::next(MII), MBB->begin(), PhysReg, TRI, false, SS, in InsertEmergencySpills()
1786 MachineBasicBlock::iterator MII = MI; in InsertRestores() local
1843 ComputeReloadLoc(MII, MBB->begin(), Phys, TRI, DoReMat, SSorRMId, TII, in InsertRestores()
1864 ComputeReloadLoc(MII, MBB->begin(), Phys, TRI, DoReMat, SSorRMId, TII, in InsertRestores()
1884 DEBUG(dbgs() << '\t' << *prior(MII)); in InsertRestores()
1894 MachineBasicBlock::iterator MII = MI; in InsertSpills() local
1905 MachineBasicBlock::iterator oldNextMII = llvm::next(MII); in InsertSpills()
1906 TII->storeRegToStackSlot(*MBB, llvm::next(MII), Phys, isKill, StackSlot, in InsertSpills()
2294 for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); in RewriteMBB() local
2295 MII != E; ) { in RewriteMBB()
2296 MachineBasicBlock::iterator NextMII = llvm::next(MII); in RewriteMBB()
2298 if (OptimizeByUnfold(MII, MaybeDeadStores, Spills, RegKills, KillOps)) in RewriteMBB()
2299 NextMII = llvm::next(MII); in RewriteMBB()
2301 if (InsertEmergencySpills(MII)) in RewriteMBB()
2302 NextMII = llvm::next(MII); in RewriteMBB()
2304 InsertRestores(MII, Spills, RegKills, KillOps); in RewriteMBB()
2306 if (InsertSpills(MII)) in RewriteMBB()
2307 NextMII = llvm::next(MII); in RewriteMBB()
2311 MachineInstr &MI = *MII; in RewriteMBB()
2390 MBB->insert(MII, NewMIs[0]); in RewriteMBB()
2423 MBB->insert(MII, NewMIs[0]); in RewriteMBB()
2425 MBB->insert(MII, NewStore); in RewriteMBB()
2473 if (CommuteToFoldReload(MII, VirtReg, SrcReg, StackSlot, in RewriteMBB()
2475 NextMII = llvm::next(MII); in RewriteMBB()
2590 SpillRegToStackSlot(MII, -1, PhysReg, StackSlot, RC, true, in RewriteMBB()
2592 NextMII = llvm::next(MII); in RewriteMBB()
2620 MII = NextMII; in RewriteMBB()