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,
218 bool eliminateUndefCopy(MachineInstr *CopyMI);
472 MachineInstr *CopyMI) { in adjustCopiesBackFrom() argument
480 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot(); in adjustCopiesBackFrom()
531 if (!ValSEndInst || ValSEndInst->getParent() != CopyMI->getParent()) in adjustCopiesBackFrom()
577 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI); in adjustCopiesBackFrom()
625 MachineInstr *CopyMI) { in removeCopyByCommutingDef() argument
655 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot(); in removeCopyByCommutingDef()
770 if (UseMI == CopyMI) in removeCopyByCommutingDef()
881 MachineInstr *CopyMI, in reMaterializeTrivialDef() argument
892 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI); in reMaterializeTrivialDef()
917 MachineOperand &DstOperand = CopyMI->getOperand(0); in reMaterializeTrivialDef()
952 DebugLoc DL = CopyMI->getDebugLoc(); in reMaterializeTrivialDef()
953 MachineBasicBlock *MBB = CopyMI->getParent(); in reMaterializeTrivialDef()
955 std::next(MachineBasicBlock::iterator(CopyMI)); in reMaterializeTrivialDef()
985 ImplicitOps.reserve(CopyMI->getNumOperands() - in reMaterializeTrivialDef()
986 CopyMI->getDesc().getNumOperands()); in reMaterializeTrivialDef()
987 for (unsigned I = CopyMI->getDesc().getNumOperands(), in reMaterializeTrivialDef()
988 E = CopyMI->getNumOperands(); in reMaterializeTrivialDef()
990 MachineOperand &MO = CopyMI->getOperand(I); in reMaterializeTrivialDef()
999 LIS->ReplaceMachineInstrInMaps(*CopyMI, NewMI); in reMaterializeTrivialDef()
1000 CopyMI->eraseFromParent(); in reMaterializeTrivialDef()
1001 ErasedInstrs.insert(CopyMI); in reMaterializeTrivialDef()
1135 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI) { in eliminateUndefCopy() argument
1148 isMoveInstr(*TRI, CopyMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx); in eliminateUndefCopy()
1150 SlotIndex Idx = LIS->getInstructionIndex(*CopyMI); in eliminateUndefCopy()
1341 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) { in joinCopy() argument
1344 DEBUG(dbgs() << LIS->getInstructionIndex(*CopyMI) << '\t' << *CopyMI); in joinCopy()
1347 if (!CP.setRegisters(CopyMI)) { in joinCopy()
1361 if (!TRI->shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx, in joinCopy()
1371 if (!CP.isPhys() && CopyMI->allDefsAreDead()) { in joinCopy()
1373 DeadDefs.push_back(CopyMI); in joinCopy()
1379 if (!CP.isPhys() && eliminateUndefCopy(CopyMI)) { in joinCopy()
1380 LIS->RemoveMachineInstrFromMaps(*CopyMI); in joinCopy()
1381 CopyMI->eraseFromParent(); in joinCopy()
1391 const SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI); in joinCopy()
1409 LIS->RemoveMachineInstrFromMaps(*CopyMI); in joinCopy()
1410 CopyMI->eraseFromParent(); in joinCopy()
1423 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy)) in joinCopy()
1462 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy)) in joinCopy()
1468 if (adjustCopiesBackFrom(CP, CopyMI) || in joinCopy()
1469 removeCopyByCommutingDef(CP, CopyMI)) { in joinCopy()
1470 LIS->RemoveMachineInstrFromMaps(*CopyMI); in joinCopy()
1471 CopyMI->eraseFromParent(); in joinCopy()
1498 ErasedInstrs.erase(CopyMI); in joinCopy()
1573 MachineInstr *CopyMI; in joinReservedPhysReg() local
1575 CopyMI = MRI->getVRegDef(RHS.reg); in joinReservedPhysReg()
1583 CopyMI = &*MRI->use_instr_nodbg_begin(RHS.reg); in joinReservedPhysReg()
1584 const SlotIndex CopyRegIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot(); in joinReservedPhysReg()
1621 LIS->RemoveMachineInstrFromMaps(*CopyMI); in joinReservedPhysReg()
1622 CopyMI->eraseFromParent(); in joinReservedPhysReg()