Lines Matching refs:CopyMI
178 bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
190 bool removeCopyByCommutingDef(const CoalescerPair &CP,MachineInstr *CopyMI);
194 bool reMaterializeTrivialDef(const CoalescerPair &CP, MachineInstr *CopyMI,
208 bool eliminateUndefCopy(MachineInstr *CopyMI);
462 MachineInstr *CopyMI) { in adjustCopiesBackFrom() argument
470 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(); in adjustCopiesBackFrom()
521 if (!ValSEndInst || ValSEndInst->getParent() != CopyMI->getParent()) in adjustCopiesBackFrom()
567 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI); in adjustCopiesBackFrom()
615 MachineInstr *CopyMI) { in removeCopyByCommutingDef() argument
645 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(); in removeCopyByCommutingDef()
760 if (UseMI == CopyMI) in removeCopyByCommutingDef()
871 MachineInstr *CopyMI, in reMaterializeTrivialDef() argument
882 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI); in reMaterializeTrivialDef()
907 MachineOperand &DstOperand = CopyMI->getOperand(0); in reMaterializeTrivialDef()
942 MachineBasicBlock *MBB = CopyMI->getParent(); in reMaterializeTrivialDef()
944 std::next(MachineBasicBlock::iterator(CopyMI)); in reMaterializeTrivialDef()
970 LIS->ReplaceMachineInstrInMaps(CopyMI, NewMI); in reMaterializeTrivialDef()
971 CopyMI->eraseFromParent(); in reMaterializeTrivialDef()
972 ErasedInstrs.insert(CopyMI); in reMaterializeTrivialDef()
1040 for (unsigned i = CopyMI->getDesc().getNumOperands(), in reMaterializeTrivialDef()
1041 e = CopyMI->getNumOperands(); i != e; ++i) { in reMaterializeTrivialDef()
1042 MachineOperand &MO = CopyMI->getOperand(i); in reMaterializeTrivialDef()
1081 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI) { in eliminateUndefCopy() argument
1094 isMoveInstr(*TRI, CopyMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx); in eliminateUndefCopy()
1096 SlotIndex Idx = LIS->getInstructionIndex(CopyMI); in eliminateUndefCopy()
1267 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) { in joinCopy() argument
1270 DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI); in joinCopy()
1273 if (!CP.setRegisters(CopyMI)) { in joinCopy()
1287 if (!TRI->shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx, in joinCopy()
1297 if (!CP.isPhys() && CopyMI->allDefsAreDead()) { in joinCopy()
1299 DeadDefs.push_back(CopyMI); in joinCopy()
1305 if (!CP.isPhys() && eliminateUndefCopy(CopyMI)) { in joinCopy()
1306 LIS->RemoveMachineInstrFromMaps(CopyMI); in joinCopy()
1307 CopyMI->eraseFromParent(); in joinCopy()
1317 const SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI); in joinCopy()
1335 LIS->RemoveMachineInstrFromMaps(CopyMI); in joinCopy()
1336 CopyMI->eraseFromParent(); in joinCopy()
1349 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy)) in joinCopy()
1388 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy)) in joinCopy()
1394 if (adjustCopiesBackFrom(CP, CopyMI) || in joinCopy()
1395 removeCopyByCommutingDef(CP, CopyMI)) { in joinCopy()
1396 LIS->RemoveMachineInstrFromMaps(CopyMI); in joinCopy()
1397 CopyMI->eraseFromParent(); in joinCopy()
1424 ErasedInstrs.erase(CopyMI); in joinCopy()
1499 MachineInstr *CopyMI; in joinReservedPhysReg() local
1501 CopyMI = MRI->getVRegDef(RHS.reg); in joinReservedPhysReg()
1509 CopyMI = &*MRI->use_instr_nodbg_begin(RHS.reg); in joinReservedPhysReg()
1510 const SlotIndex CopyRegIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(); in joinReservedPhysReg()
1547 LIS->RemoveMachineInstrFromMaps(CopyMI); in joinReservedPhysReg()
1548 CopyMI->eraseFromParent(); in joinReservedPhysReg()