Lines Matching refs:VirtReg

369   unsigned VirtReg;  member
374 AssignedPhysReg(apr), VirtReg(vreg) {} in ReusedOp()
396 unsigned VirtReg) { in addReuse() argument
403 AssignedPhysReg, VirtReg)); in addReuse()
437 unsigned GetRegForReload(unsigned VirtReg, unsigned PhysReg, MachineInstr *MI, in GetRegForReload() argument
445 const TargetRegisterClass* RC = MF.getRegInfo().getRegClass(VirtReg); in GetRegForReload()
692 unsigned VirtReg = MO.getReg(); in ReMaterialize() local
693 if (TargetRegisterInfo::isPhysicalRegister(VirtReg)) in ReMaterialize()
696 unsigned Phys = VRM.getPhys(VirtReg); in ReMaterialize()
905 MBB->getParent()->getRegInfo().getRegClass(Op.VirtReg); in GetRegForReload()
934 ? VRM.getReMatId(NewOp.VirtReg) : (int) NewOp.StackSlotOrReMat; in GetRegForReload()
942 ReMaterialize(*MBB, InsertLoc, NewPhysReg, NewOp.VirtReg, TII, in GetRegForReload()
990 unsigned VirtReg = I->second.first; in FoldsStackSlotModRef() local
993 if (VRM.getStackSlot(VirtReg) == SS) { in FoldsStackSlotModRef()
1076 void AssignPhysToVirtReg(MachineInstr *MI, unsigned VirtReg, unsigned PhysReg, in AssignPhysToVirtReg() argument
1080 if (MO.isReg() && MO.getReg() == VirtReg) in AssignPhysToVirtReg()
1122 bool OptimizeByUnfold2(unsigned VirtReg, int SS,
1136 unsigned VirtReg, unsigned SrcReg, int SS,
1275 OptimizeByUnfold2(unsigned VirtReg, int SS, in OptimizeByUnfold2() argument
1294 const TargetRegisterClass* RC = MRI->getRegClass(VirtReg); in OptimizeByUnfold2()
1324 if (!TII->unfoldMemoryOperand(MF, &MI, VirtReg, false, false, NewMIs)) in OptimizeByUnfold2()
1327 AssignPhysToVirtReg(NewMIs[0], VirtReg, PhysReg, *TRI); in OptimizeByUnfold2()
1339 if (!TII->unfoldMemoryOperand(MF, &NextMI, VirtReg, false, false, NewMIs)) in OptimizeByUnfold2()
1342 AssignPhysToVirtReg(NewMIs[0], VirtReg, PhysReg, *TRI); in OptimizeByUnfold2()
1359 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in OptimizeByUnfold2()
1427 unsigned VirtReg = MO.getReg(); in OptimizeByUnfold() local
1428 if (TargetRegisterInfo::isPhysicalRegister(VirtReg) || MO.getSubReg()) in OptimizeByUnfold()
1430 if (VRM->isAssignedReg(VirtReg)) { in OptimizeByUnfold()
1431 unsigned PhysReg = VRM->getPhys(VirtReg); in OptimizeByUnfold()
1434 } else if (VRM->isReMaterialized(VirtReg)) in OptimizeByUnfold()
1436 int SS = VRM->getStackSlot(VirtReg); in OptimizeByUnfold()
1443 if (VRM->hasPhys(VirtReg)) { in OptimizeByUnfold()
1444 PhysReg = VRM->getPhys(VirtReg); in OptimizeByUnfold()
1460 int Idx = NewMI->findRegisterUseOperandIdx(VirtReg, false); in OptimizeByUnfold()
1470 VRM->virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef); in OptimizeByUnfold()
1519 unsigned VirtReg, unsigned SrcReg, int SS, in CommuteToFoldReload() argument
1567 VRM->virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef); in CommuteToFoldReload()
1569 const TargetRegisterClass* RC = MRI->getRegClass(VirtReg); in CommuteToFoldReload()
1574 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in CommuteToFoldReload()
1789 unsigned VirtReg = RestoreRegs[e-i-1]; // Reverse order. in InsertRestores() local
1790 if (!VRM->getPreSplitReg(VirtReg)) in InsertRestores()
1792 unsigned Phys = VRM->getPhys(VirtReg); in InsertRestores()
1805 bool DoReMat = VRM->isReMaterialized(VirtReg); in InsertRestores()
1807 ? VRM->getReMatId(VirtReg) : VRM->getStackSlot(VirtReg); in InsertRestores()
1818 << TRI->getName(InReg) << " for " << PrintReg(VirtReg) in InsertRestores()
1834 << TRI->getName(InReg) << " for " << PrintReg(VirtReg) in InsertRestores()
1867 if (VRM->isReMaterialized(VirtReg)) { in InsertRestores()
1868 ReMaterialize(*MBB, InsertLoc, Phys, VirtReg, TII, TRI, *VRM); in InsertRestores()
1870 const TargetRegisterClass* RC = MRI->getRegClass(VirtReg); in InsertRestores()
1898 unsigned VirtReg = SpillRegs[i].first; in InsertSpills() local
1900 if (!VRM->getPreSplitReg(VirtReg)) in InsertSpills()
1902 const TargetRegisterClass *RC = MRI->getRegClass(VirtReg); in InsertSpills()
1903 unsigned Phys = VRM->getPhys(VirtReg); in InsertSpills()
1904 int StackSlot = VRM->getStackSlot(VirtReg); in InsertSpills()
1911 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in InsertSpills()
1932 unsigned VirtReg = MO.getReg(); in ProcessUses() local
1934 if (TargetRegisterInfo::isPhysicalRegister(VirtReg)) { in ProcessUses()
1937 MRI->setPhysRegUsed(VirtReg); in ProcessUses()
1956 if (MO.isDef() && MO.getSubReg() && MI.readsVirtualRegister(VirtReg) && in ProcessUses()
1957 MI.findRegisterUseOperandIdx(VirtReg) == -1) { in ProcessUses()
1959 MI.addOperand(MachineOperand::CreateReg(VirtReg, in ProcessUses()
1971 unsigned VirtReg = MI.getOperand(i).getReg(); in ProcessUses() local
1972 assert(TargetRegisterInfo::isVirtualRegister(VirtReg) && in ProcessUses()
1976 if (VRM->isAssignedReg(VirtReg)) { in ProcessUses()
1978 unsigned Phys = VRM->getPhys(VirtReg); in ProcessUses()
1983 if (VRM->isImplicitlyDefined(VirtReg)) in ProcessUses()
2004 bool DoReMat = VRM->isReMaterialized(VirtReg); in ProcessUses()
2006 ? VRM->getReMatId(VirtReg) : VRM->getStackSlot(VirtReg); in ProcessUses()
2023 const TargetRegisterClass* RC = MRI->getRegClass(VirtReg); in ProcessUses()
2052 << " for " << PrintReg(VirtReg) << ": " << MOk in ProcessUses()
2067 << TRI->getName(PhysReg) << " for " << PrintReg(VirtReg) in ProcessUses()
2069 << PrintReg(VRM->getPhys(VirtReg), TRI) << '\n'); in ProcessUses()
2092 VRM->getPhys(VirtReg), VirtReg); in ProcessUses()
2113 if (!isTied && KilledMIRegs.count(VirtReg) == 0) { in ProcessUses()
2115 KilledMIRegs.insert(VirtReg); in ProcessUses()
2132 unsigned DesignatedReg = VRM->getPhys(VirtReg); in ProcessUses()
2141 GetRegForReload(VirtReg, DesignatedReg, &MI, Spills, in ProcessUses()
2154 << " for " << PrintReg(VirtReg) in ProcessUses()
2191 PhysReg = VRM->getPhys(VirtReg); in ProcessUses()
2199 PhysReg = ReusedOperands.GetRegForReload(VirtReg, PhysReg, &MI, in ProcessUses()
2213 ReMaterialize(*MBB, InsertLoc, PhysReg, VirtReg, TII, TRI, *VRM); in ProcessUses()
2215 const TargetRegisterClass* RC = MRI->getRegClass(VirtReg); in ProcessUses()
2232 KilledMIRegs.count(VirtReg) == 0) { in ProcessUses()
2234 KilledMIRegs.insert(VirtReg); in ProcessUses()
2341 unsigned VirtReg = FoldedVirts[FVI].first; in RewriteMBB() local
2343 DEBUG(dbgs() << "Folded " << PrintReg(VirtReg) << " MR: " << MR); in RewriteMBB()
2345 int SS = VRM->getStackSlot(VirtReg); in RewriteMBB()
2452 VRM->virtFolded(VirtReg, NewStore, VirtRegMap::isMod); in RewriteMBB()
2473 if (CommuteToFoldReload(MII, VirtReg, SrcReg, StackSlot, in RewriteMBB()
2501 unsigned VirtReg = MO.getReg(); in RewriteMBB() local
2502 if (!TargetRegisterInfo::isVirtualRegister(VirtReg)) { in RewriteMBB()
2522 Spills.disallowClobberPhysReg(VirtReg); in RewriteMBB()
2527 Spills.ClobberPhysReg(VirtReg); in RewriteMBB()
2528 ReusedOperands.markClobbered(VirtReg); in RewriteMBB()
2534 assert(DestReg == VirtReg && "Unknown load situation!"); in RewriteMBB()
2547 bool DoReMat = VRM->isReMaterialized(VirtReg); in RewriteMBB()
2552 int StackSlot = VRM->getStackSlot(VirtReg); in RewriteMBB()
2553 const TargetRegisterClass *RC = MRI->getRegClass(VirtReg); in RewriteMBB()
2568 PhysReg = VRM->getPhys(VirtReg); in RewriteMBB()
2572 PhysReg = ReusedOperands.GetRegForReload(VirtReg, PhysReg, &MI, in RewriteMBB()
2588 if (!MO.isDead() && SpilledMIRegs.insert(VirtReg)) { in RewriteMBB()