Lines Matching refs:SS
980 static bool FoldsStackSlotModRef(MachineInstr &MI, int SS, unsigned PhysReg, in FoldsStackSlotModRef() argument
993 if (VRM.getStackSlot(VirtReg) == SS) { in FoldsStackSlotModRef()
1122 bool OptimizeByUnfold2(unsigned VirtReg, int SS,
1136 unsigned VirtReg, unsigned SrcReg, int SS,
1242 int SS = VRM->getLowSpillSlot(); in runOnMachineFunction() local
1243 if (SS != VirtRegMap::NO_STACK_SLOT) { in runOnMachineFunction()
1244 for (int e = VRM->getHighSpillSlot(); SS <= e; ++SS) { in runOnMachineFunction()
1245 SmallVector<MachineInstr*, 4> &DbgValues = Slot2DbgValues[SS]; in runOnMachineFunction()
1246 if (!VRM->isSpillSlotUsed(SS)) { in runOnMachineFunction()
1247 MFI->RemoveStackObject(SS); in runOnMachineFunction()
1250 DEBUG(dbgs() << "Removing debug info referencing FI#" << SS << '\n'); in runOnMachineFunction()
1275 OptimizeByUnfold2(unsigned VirtReg, int SS, in OptimizeByUnfold2() argument
1302 if (!FoldsStackSlotModRef(MI, SS, PhysReg, TII, TRI, *VRM)) in OptimizeByUnfold2()
1308 if (!FoldsStackSlotModRef(*NextMII, SS, PhysReg, TII, TRI, *VRM)) 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()
1319 Spills.addAvailable(SS, PhysReg); in OptimizeByUnfold2()
1320 MaybeDeadStores[SS] = NULL; in OptimizeByUnfold2()
1353 } while (FoldsStackSlotModRef(*NextMII, SS, PhysReg, TII, TRI, *VRM)); in OptimizeByUnfold2()
1356 TII->storeRegToStackSlot(*MBB, NextMII, PhysReg, true, SS, RC, TRI); in OptimizeByUnfold2()
1358 VRM->addSpillSlotUse(SS, StoreMI); in OptimizeByUnfold2()
1436 int SS = VRM->getStackSlot(VirtReg); in OptimizeByUnfold() local
1437 unsigned PhysReg = Spills.getSpillSlotOrReMatPhysReg(SS); in OptimizeByUnfold()
1464 MachineInstr *FoldedMI = TII->foldMemoryOperand(NewMI, Ops, SS); in OptimizeByUnfold()
1467 VRM->addSpillSlotUse(SS, FoldedMI); in OptimizeByUnfold()
1519 unsigned VirtReg, unsigned SrcReg, int SS, in CommuteToFoldReload() argument
1542 if (DestReg != SrcReg || FrameIdx != SS) in CommuteToFoldReload()
1560 MachineInstr *FoldedMI = TII->foldMemoryOperand(CommutedMI, Ops, SS); in CommuteToFoldReload()
1566 VRM->addSpillSlotUse(SS, FoldedMI); in CommuteToFoldReload()
1570 TII->storeRegToStackSlot(*MBB, &MI, NewReg, true, SS, RC, TRI); in CommuteToFoldReload()
1573 VRM->addSpillSlotUse(SS, StoreMI); in CommuteToFoldReload()
1755 int SS = VRM->getEmergencySpillSlot(RC); in InsertEmergencySpills() local
1756 if (UsedSS.count(SS)) in InsertEmergencySpills()
1758 UsedSS.insert(SS); in InsertEmergencySpills()
1759 TII->storeRegToStackSlot(*MBB, MII, PhysReg, true, SS, RC, TRI); in InsertEmergencySpills()
1761 VRM->addSpillSlotUse(SS, StoreMI); in InsertEmergencySpills()
1765 ComputeReloadLoc(llvm::next(MII), MBB->begin(), PhysReg, TRI, false, SS, in InsertEmergencySpills()
1768 TII->loadRegFromStackSlot(*MBB, InsertLoc, PhysReg, SS, RC, TRI); in InsertEmergencySpills()
1771 VRM->addSpillSlotUse(SS, LoadMI); in InsertEmergencySpills()
2345 int SS = VRM->getStackSlot(VirtReg); in RewriteMBB() local
2346 if (SS == VirtRegMap::NO_STACK_SLOT) in RewriteMBB()
2348 FoldedSS.insert(SS); in RewriteMBB()
2349 DEBUG(dbgs() << " - StackSlot: " << SS << "\n"); in RewriteMBB()
2356 if (DestReg && FrameIdx == SS) { in RewriteMBB()
2359 if (unsigned InReg = Spills.getSpillSlotOrReMatPhysReg(SS)) { in RewriteMBB()
2386 unsigned PhysReg = Spills.getSpillSlotOrReMatPhysReg(SS); in RewriteMBB()
2403 MachineInstr* DeadStore = MaybeDeadStores[SS]; in RewriteMBB()
2408 unsigned PhysReg = Spills.getSpillSlotOrReMatPhysReg(SS); in RewriteMBB()
2416 !TII->isStoreToStackSlot(&MI, SS)) { // Not profitable! in RewriteMBB()
2426 VRM->addSpillSlotUse(SS, NewStore); in RewriteMBB()
2448 MaybeDeadStores[SS] = NULL; in RewriteMBB()
2461 Spills.ModifyStackSlotOrReMat(SS); in RewriteMBB()