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);
427 MachineInstr *CopyMI) {
435 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
469 // CopyMI.
472 if (!ValLREndInst || ValLREndInst->getParent() != CopyMI->getParent())
475 // Okay, we now know that ValLR ends in the same block that the CopyMI
483 // We are about to delete CopyMI, so need to remove it as the 'instruction
508 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI);
570 MachineInstr *CopyMI) {
573 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
693 if (UseMI == CopyMI)
735 MachineInstr *CopyMI,
746 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
748 assert(ValNo && "CopyMI input register not live");
769 MachineOperand &DstOperand = CopyMI->getOperand(0);
796 MachineBasicBlock *MBB = CopyMI->getParent();
798 llvm::next(MachineBasicBlock::iterator(CopyMI));
802 LIS->ReplaceMachineInstrInMaps(CopyMI, NewMI);
803 CopyMI->eraseFromParent();
804 ErasedInstrs.insert(CopyMI);
861 // CopyMI
863 for (unsigned i = CopyMI->getDesc().getNumOperands(),
864 e = CopyMI->getNumOperands(); i != e; ++i) {
865 MachineOperand &MO = CopyMI->getOperand(i);
901 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI,
903 SlotIndex Idx = LIS->getInstructionIndex(CopyMI);
911 // No intervals are live-in to CopyMI - it is undef.
1012 /// which are the src/dst of the copy instruction CopyMI. This returns true
1016 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
1019 DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI);
1022 if (!CP.setRegisters(CopyMI)) {
1030 if (!CP.isPhys() && CopyMI->allDefsAreDead()) {
1032 DeadDefs.push_back(CopyMI);
1038 if (!CP.isPhys() && eliminateUndefCopy(CopyMI, CP)) {
1040 LIS->RemoveMachineInstrFromMaps(CopyMI);
1041 CopyMI->eraseFromParent();
1051 LiveRangeQuery LRQ(LI, LIS->getInstructionIndex(CopyMI));
1059 LIS->RemoveMachineInstrFromMaps(CopyMI);
1060 CopyMI->eraseFromParent();
1073 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1109 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1114 if (adjustCopiesBackFrom(CP, CopyMI) ||
1115 removeCopyByCommutingDef(CP, CopyMI)) {
1116 LIS->RemoveMachineInstrFromMaps(CopyMI);
1117 CopyMI->eraseFromParent();
1141 // CopyMI has been erased by joinIntervals at this point. Remove it from
1144 ErasedInstrs.erase(CopyMI);
1200 MachineInstr *CopyMI = MRI->getVRegDef(RHS.reg);
1201 LIS->RemoveMachineInstrFromMaps(CopyMI);
1202 CopyMI->eraseFromParent();