Lines Matching refs:CopyMI

144     /// src/dst of the copy instruction CopyMI.  This returns true if the copy
178 bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
190 bool removeCopyByCommutingDef(const CoalescerPair &CP,MachineInstr *CopyMI);
194 bool reMaterializeTrivialDef(const CoalescerPair &CP, MachineInstr *CopyMI,
207 /// Returns true if @p CopyMI was a copy of an undef value and eliminated.
208 bool eliminateUndefCopy(MachineInstr *CopyMI);
462 MachineInstr *CopyMI) {
470 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
518 // CopyMI.
521 if (!ValSEndInst || ValSEndInst->getParent() != CopyMI->getParent())
524 // Okay, we now know that ValS ends in the same block that the CopyMI
532 // We are about to delete CopyMI, so need to remove it as the 'instruction
567 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI);
615 MachineInstr *CopyMI) {
645 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
760 if (UseMI == CopyMI)
871 MachineInstr *CopyMI,
882 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
884 assert(ValNo && "CopyMI input register not live");
907 MachineOperand &DstOperand = CopyMI->getOperand(0);
942 MachineBasicBlock *MBB = CopyMI->getParent();
944 std::next(MachineBasicBlock::iterator(CopyMI));
950 // %vreg1 = copy %vreg0:subreg ; CopyMI, SrcIdx = 0
970 LIS->ReplaceMachineInstrInMaps(CopyMI, NewMI);
971 CopyMI->eraseFromParent();
972 ErasedInstrs.insert(CopyMI);
1038 // CopyMI may have implicit operands, transfer them over to the newly
1040 for (unsigned i = CopyMI->getDesc().getNumOperands(),
1041 e = CopyMI->getNumOperands(); i != e; ++i) {
1042 MachineOperand &MO = CopyMI->getOperand(i);
1081 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI) {
1094 isMoveInstr(*TRI, CopyMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx);
1096 SlotIndex Idx = LIS->getInstructionIndex(CopyMI);
1098 // CopyMI is undef iff SrcReg is not live before the instruction.
1267 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
1270 DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI);
1273 if (!CP.setRegisters(CopyMI)) {
1287 if (!TRI->shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx,
1297 if (!CP.isPhys() && CopyMI->allDefsAreDead()) {
1299 DeadDefs.push_back(CopyMI);
1305 if (!CP.isPhys() && eliminateUndefCopy(CopyMI)) {
1306 LIS->RemoveMachineInstrFromMaps(CopyMI);
1307 CopyMI->eraseFromParent();
1317 const SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
1335 LIS->RemoveMachineInstrFromMaps(CopyMI);
1336 CopyMI->eraseFromParent();
1349 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1388 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1394 if (adjustCopiesBackFrom(CP, CopyMI) ||
1395 removeCopyByCommutingDef(CP, CopyMI)) {
1396 LIS->RemoveMachineInstrFromMaps(CopyMI);
1397 CopyMI->eraseFromParent();
1421 // CopyMI has been erased by joinIntervals at this point. Remove it from
1424 ErasedInstrs.erase(CopyMI);
1499 MachineInstr *CopyMI;
1501 CopyMI = MRI->getVRegDef(RHS.reg);
1509 CopyMI = &*MRI->use_instr_nodbg_begin(RHS.reg);
1510 const SlotIndex CopyRegIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
1547 LIS->RemoveMachineInstrFromMaps(CopyMI);
1548 CopyMI->eraseFromParent();