Home | History | Annotate | Download | only in CodeGen

Lines Matching defs: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);
182 bool eliminateUndefCopy(MachineInstr *CopyMI, const CoalescerPair &CP);
426 MachineInstr *CopyMI) {
434 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
468 // CopyMI.
471 if (!ValLREndInst || ValLREndInst->getParent() != CopyMI->getParent())
474 // Okay, we now know that ValLR 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();
692 if (UseMI == CopyMI)
734 MachineInstr *CopyMI) {
741 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(true);
762 MachineOperand &DstOperand = CopyMI->getOperand(0);
777 MachineBasicBlock *MBB = CopyMI->getParent();
779 llvm::next(MachineBasicBlock::iterator(CopyMI));
784 // class of its destination matches the destination of CopyMI, and CopyMI is
803 // CopyMI may have implicit operands, transfer them over to the newly
805 for (unsigned i = CopyMI->getDesc().getNumOperands(),
806 e = CopyMI->getNumOperands(); i != e; ++i) {
807 MachineOperand &MO = CopyMI->getOperand(i);
817 LIS->ReplaceMachineInstrInMaps(CopyMI, NewMI);
827 CopyMI->eraseFromParent();
828 ErasedInstrs.insert(CopyMI);
847 bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI,
849 SlotIndex Idx = LIS->getInstructionIndex(CopyMI);
857 // No intervals are live-in to CopyMI - it is undef.
958 /// which are the src/dst of the copy instruction CopyMI. This returns true
962 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
965 DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI);
968 if (!CP.setRegisters(CopyMI)) {
976 if (!CP.isPhys() && CopyMI->allDefsAreDead()) {
978 DeadDefs.push_back(CopyMI);
984 if (!CP.isPhys() && eliminateUndefCopy(CopyMI, CP)) {
986 LIS->RemoveMachineInstrFromMaps(CopyMI);
987 CopyMI->eraseFromParent();
997 LiveRangeQuery LRQ(LI, LIS->getInstructionIndex(CopyMI));
1005 LIS->RemoveMachineInstrFromMaps(CopyMI);
1006 CopyMI->eraseFromParent();
1018 if (reMaterializeTrivialDef(CP, CopyMI))
1051 if (reMaterializeTrivialDef(CP, CopyMI))
1056 if (adjustCopiesBackFrom(CP, CopyMI) ||
1057 removeCopyByCommutingDef(CP, CopyMI)) {
1058 LIS->RemoveMachineInstrFromMaps(CopyMI);
1059 CopyMI->eraseFromParent();
1083 // CopyMI has been erased by joinIntervals at this point. Remove it from
1086 ErasedInstrs.erase(CopyMI);
1142 MachineInstr *CopyMI = MRI->getVRegDef(RHS.reg);
1143 LIS->RemoveMachineInstrFromMaps(CopyMI);
1144 CopyMI->eraseFromParent();