Lines Matching refs:CopyMI

132     /// which are the src/dst of the copy instruction CopyMI.  This returns
154 bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
165 bool removeCopyByCommutingDef(const CoalescerPair &CP,MachineInstr *CopyMI);
169 bool reMaterializeTrivialDef(CoalescerPair &CP, MachineInstr *CopyMI,
183 bool eliminateUndefCopy(MachineInstr *CopyMI, const CoalescerPair &CP);
426 MachineInstr *CopyMI) {
434 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
468 // CopyMI.
471 if (!ValSEndInst || ValSEndInst->getParent() != CopyMI->getParent())
474 // Okay, we now know that ValS ends in the same block that the CopyMI
482 // We are about to delete CopyMI, so need to remove it as the 'instruction
507 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI);
569 MachineInstr *CopyMI) {
572 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
689 if (UseMI == CopyMI)
731 MachineInstr *CopyMI,
742 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
744 assert(ValNo && "CopyMI input register not live");
765 MachineOperand &DstOperand = CopyMI->getOperand(0);
800 MachineBasicBlock *MBB = CopyMI->getParent();
802 std::next(MachineBasicBlock::iterator(CopyMI));
806 LIS->ReplaceMachineInstrInMaps(CopyMI, NewMI);
807 CopyMI->eraseFromParent();
808 ErasedInstrs.insert(CopyMI);
874 // CopyMI may have implicit operands, transfer them over to the newly
876 for (unsigned i = CopyMI->getDesc().getNumOperands(),
877 e = CopyMI->getNumOperands(); i != e; ++i) {
878 MachineOperand &MO = CopyMI->getOperand(i);
914 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI,
916 SlotIndex Idx = LIS->getInstructionIndex(CopyMI);
924 // No intervals are live-in to CopyMI - it is undef.
1025 /// which are the src/dst of the copy instruction CopyMI. This returns true
1029 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
1032 DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI);
1035 if (!CP.setRegisters(CopyMI)) {
1043 if (!CP.isPhys() && CopyMI->allDefsAreDead()) {
1045 DeadDefs.push_back(CopyMI);
1051 if (!CP.isPhys() && eliminateUndefCopy(CopyMI, CP)) {
1053 LIS->RemoveMachineInstrFromMaps(CopyMI);
1054 CopyMI->eraseFromParent();
1064 LiveQueryResult LRQ = LI.Query(LIS->getInstructionIndex(CopyMI));
1072 LIS->RemoveMachineInstrFromMaps(CopyMI);
1073 CopyMI->eraseFromParent();
1086 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1122 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1128 if (adjustCopiesBackFrom(CP, CopyMI) ||
1129 removeCopyByCommutingDef(CP, CopyMI)) {
1130 LIS->RemoveMachineInstrFromMaps(CopyMI);
1131 CopyMI->eraseFromParent();
1155 // CopyMI has been erased by joinIntervals at this point. Remove it from
1158 ErasedInstrs.erase(CopyMI);
1215 MachineInstr *CopyMI = MRI->getVRegDef(RHS.reg);
1216 LIS->RemoveMachineInstrFromMaps(CopyMI);
1217 CopyMI->eraseFromParent();