Lines Matching refs:VRM
93 bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM, in runOnMachineFunction()
118 if (!VRM.hasPhys(reg)) in runOnMachineFunction()
120 unsigned pReg = VRM.getPhys(reg); in runOnMachineFunction()
424 VirtRegMap &VRM);
442 VirtRegMap &VRM) { in GetRegForReload() argument
447 Rejected, RegKills, KillOps, VRM); in GetRegForReload()
679 VirtRegMap &VRM) { in ReMaterialize() argument
680 MachineInstr *ReMatDefMI = VRM.getReMaterializedMI(Reg); in ReMaterialize()
696 unsigned Phys = VRM.getPhys(VirtReg); in ReMaterialize()
873 VirtRegMap &VRM) { in GetRegForReload() argument
893 Rejected, RegKills, KillOps, VRM); in GetRegForReload()
930 Rejected, RegKills, KillOps, VRM); in GetRegForReload()
934 ? VRM.getReMatId(NewOp.VirtReg) : (int) NewOp.StackSlotOrReMat; in GetRegForReload()
943 TRI, VRM); in GetRegForReload()
948 VRM.addSpillSlotUse(NewOp.StackSlotOrReMat, LoadMI); in GetRegForReload()
983 VirtRegMap &VRM) { in FoldsStackSlotModRef() argument
984 if (VRM.hasEmergencySpills(&MI) || VRM.isSpillPt(&MI)) in FoldsStackSlotModRef()
989 for (tie(I, End) = VRM.getFoldedVirts(&MI); I != End; ++I) { in FoldsStackSlotModRef()
993 if (VRM.getStackSlot(VirtReg) == SS) { in FoldsStackSlotModRef()
1008 if (!VRM.hasPhys(Reg)) in FoldsStackSlotModRef()
1010 Reg = VRM.getPhys(Reg); in FoldsStackSlotModRef()
1102 VirtRegMap *VRM; member in __anond254b4590511::LocalRewriter
1112 bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM,
1117 VRM->RemoveMachineInstrFromMaps(MI); in EraseInstr()
1180 VRM = &vrm; in runOnMachineFunction()
1242 int SS = VRM->getLowSpillSlot(); in runOnMachineFunction()
1244 for (int e = VRM->getHighSpillSlot(); SS <= e; ++SS) { in runOnMachineFunction()
1246 if (!VRM->isSpillSlotUsed(SS)) { in runOnMachineFunction()
1302 if (!FoldsStackSlotModRef(MI, SS, PhysReg, TII, TRI, *VRM)) in OptimizeByUnfold2()
1308 if (!FoldsStackSlotModRef(*NextMII, SS, PhysReg, TII, TRI, *VRM)) in OptimizeByUnfold2()
1328 VRM->transferRestorePts(&MI, NewMIs[0]); in OptimizeByUnfold2()
1343 VRM->transferRestorePts(&NextMI, NewMIs[0]); in OptimizeByUnfold2()
1353 } while (FoldsStackSlotModRef(*NextMII, SS, PhysReg, TII, TRI, *VRM)); in OptimizeByUnfold2()
1358 VRM->addSpillSlotUse(SS, StoreMI); in OptimizeByUnfold2()
1359 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in OptimizeByUnfold2()
1389 for (tie(I, End) = VRM->getFoldedVirts(&MI); I != End; ) { in OptimizeByUnfold()
1398 if (VRM->isAssignedReg(UnfoldVR)) in OptimizeByUnfold()
1402 FoldedSS = VRM->getStackSlot(UnfoldVR); 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()
1467 VRM->addSpillSlotUse(SS, FoldedMI); in OptimizeByUnfold()
1468 if (!VRM->hasPhys(UnfoldVR)) in OptimizeByUnfold()
1469 VRM->assignVirt2Phys(UnfoldVR, UnfoldPR); in OptimizeByUnfold()
1470 VRM->virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef); in OptimizeByUnfold()
1566 VRM->addSpillSlotUse(SS, FoldedMI); in CommuteToFoldReload()
1567 VRM->virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef); in CommuteToFoldReload()
1573 VRM->addSpillSlotUse(SS, StoreMI); in CommuteToFoldReload()
1574 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in CommuteToFoldReload()
1613 VRM->addSpillSlotUse(StackSlot, StoreMI); in SpillRegToStackSlot()
1746 if (!VRM->hasEmergencySpills(MI)) in InsertEmergencySpills()
1750 std::vector<unsigned> &EmSpills = VRM->getEmergencySpills(MI); in InsertEmergencySpills()
1755 int SS = VRM->getEmergencySpillSlot(RC); in InsertEmergencySpills()
1761 VRM->addSpillSlotUse(SS, StoreMI); in InsertEmergencySpills()
1771 VRM->addSpillSlotUse(SS, LoadMI); in InsertEmergencySpills()
1784 if (!VRM->isRestorePt(MI)) in InsertRestores()
1787 std::vector<unsigned> &RestoreRegs = VRM->getRestorePtRestores(MI); in InsertRestores()
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()
1867 if (VRM->isReMaterialized(VirtReg)) { in InsertRestores()
1868 ReMaterialize(*MBB, InsertLoc, Phys, VirtReg, TII, TRI, *VRM); in InsertRestores()
1873 VRM->addSpillSlotUse(SSorRMId, LoadMI); in InsertRestores()
1892 if (!VRM->isSpillPt(MI)) in InsertSpills()
1896 VRM->getSpillPtSpills(MI); in InsertSpills()
1900 if (!VRM->getPreSplitReg(VirtReg)) in InsertSpills()
1903 unsigned Phys = VRM->getPhys(VirtReg); in InsertSpills()
1904 int StackSlot = VRM->getStackSlot(VirtReg); in InsertSpills()
1909 VRM->addSpillSlotUse(StackSlot, StoreMI); in InsertSpills()
1911 VRM->virtFolded(VirtReg, StoreMI, VirtRegMap::isMod); in InsertSpills()
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()
2069 << PrintReg(VRM->getPhys(VirtReg), TRI) << '\n'); in ProcessUses()
2092 VRM->getPhys(VirtReg), VirtReg); in ProcessUses()
2132 unsigned DesignatedReg = VRM->getPhys(VirtReg); in ProcessUses()
2142 MaybeDeadStores, RegKills, KillOps, *VRM); in ProcessUses()
2191 PhysReg = VRM->getPhys(VirtReg); in ProcessUses()
2200 Spills, MaybeDeadStores, RegKills, KillOps, *VRM); in ProcessUses()
2213 ReMaterialize(*MBB, InsertLoc, PhysReg, VirtReg, TII, TRI, *VRM); in ProcessUses()
2218 VRM->addSpillSlotUse(SSorRMId, LoadMI); in ProcessUses()
2335 VRM->getFoldedVirts(&MI); in RewriteMBB()
2345 int SS = VRM->getStackSlot(VirtReg); in RewriteMBB()
2426 VRM->addSpillSlotUse(SS, NewStore); in RewriteMBB()
2452 VRM->virtFolded(VirtReg, NewStore, VirtRegMap::isMod); in RewriteMBB()
2547 bool DoReMat = VRM->isReMaterialized(VirtReg); in RewriteMBB()
2552 int StackSlot = VRM->getStackSlot(VirtReg); in RewriteMBB()
2568 PhysReg = VRM->getPhys(VirtReg); in RewriteMBB()
2573 Spills, MaybeDeadStores, RegKills, KillOps, *VRM); in RewriteMBB()