• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/

Lines Matching defs:CopyMI

215     /// src/dst of the copy instruction CopyMI.  This returns true if the copy
219 bool joinCopy(MachineInstr *CopyMI, bool &Again);
255 bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
271 MachineInstr *CopyMI);
274 bool removePartialRedundancy(const CoalescerPair &CP, MachineInstr &CopyMI);
278 bool reMaterializeTrivialDef(const CoalescerPair &CP, MachineInstr *CopyMI,
301 /// PHI value, it will convert @p CopyMI to an IMPLICIT_DEF.
302 /// Returns nullptr if @p CopyMI was not in any way eliminable. Otherwise,
303 /// it returns @p CopyMI (which could be an IMPLICIT_DEF at this point).
304 MachineInstr *eliminateUndefCopy(MachineInstr *CopyMI);
585 MachineInstr *CopyMI) {
593 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot();
641 // CopyMI.
644 if (!ValSEndInst || ValSEndInst->getParent() != CopyMI->getParent())
647 // Okay, we now know that ValS ends in the same block that the CopyMI
655 // We are about to delete CopyMI, so need to remove it as the 'instruction
701 CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI);
774 MachineInstr *CopyMI) {
804 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot();
919 if (UseMI == CopyMI)
1061 MachineInstr &CopyMI) {
1063 if (!CopyMI.isFullCopy())
1066 MachineBasicBlock &MBB = *CopyMI.getParent();
1081 SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(true);
1087 // No B is referenced before CopyMI in MBB.
1133 // reverse copy, CopyMI can be removed trivially if only IntA/IntB is updated.
1134 // If CopyLeftBB is not nullptr, move CopyMI from MBB to CopyLeftBB and
1157 << printMBBReference(*CopyLeftBB) << '\t' << CopyMI);
1160 MachineInstr *NewCopyMI = BuildMI(*CopyLeftBB, InsPos, CopyMI.getDebugLoc(),
1175 << printMBBReference(MBB) << '\t' << CopyMI);
1178 // Remove CopyMI.
1183 deleteInstr(&CopyMI);
1242 MachineInstr *CopyMI,
1253 SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI);
1279 MachineOperand &DstOperand = CopyMI->getOperand(0);
1314 DebugLoc DL = CopyMI->getDebugLoc();
1315 MachineBasicBlock *MBB = CopyMI->getParent();
1317 std::next(MachineBasicBlock::iterator(CopyMI));
1324 // %1 = copy %0:subreg ; CopyMI, SrcIdx = 0
1345 // CopyMI may have implicit operands, save them so that we can transfer them
1346 // over to the newly materialized instruction after CopyMI is removed.
1348 ImplicitOps.reserve(CopyMI->getNumOperands() -
1349 CopyMI->getDesc().getNumOperands());
1350 for (unsigned I = CopyMI->getDesc().getNumOperands(),
1351 E = CopyMI->getNumOperands();
1353 MachineOperand &MO = CopyMI->getOperand(I);
1362 LIS->ReplaceMachineInstrInMaps(*CopyMI, NewMI);
1363 CopyMI->eraseFromParent();
1364 ErasedInstrs.insert(CopyMI);
1562 MachineInstr *RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI) {
1575 if(!isMoveInstr(*TRI, CopyMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx))
1578 SlotIndex Idx = LIS->getInstructionIndex(*CopyMI);
1580 // CopyMI is undef iff SrcReg is not live before the instruction.
1600 CopyMI->setDesc(TII->get(TargetOpcode::IMPLICIT_DEF));
1601 for (unsigned i = CopyMI->getNumOperands(); i != 0; --i) {
1602 MachineOperand &MO = CopyMI->getOperand(i-1);
1604 CopyMI->RemoveOperand(i-1);
1608 return CopyMI;
1661 // deleting a def of a subregister may also remove uses. Since CopyMI
1665 for (MachineOperand &MO : CopyMI->operands())
1670 return CopyMI;
1805 bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
1807 LLVM_DEBUG(dbgs() << LIS->getInstructionIndex(*CopyMI) << '\t' << *CopyMI);
1810 if (!CP.setRegisters(CopyMI)) {
1824 if (!TRI->shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx,
1834 if (!CP.isPhys() && CopyMI->allDefsAreDead()) {
1836 DeadDefs.push_back(CopyMI);
1844 if (MachineInstr *UndefMI = eliminateUndefCopy(CopyMI)) {
1847 deleteInstr(CopyMI);
1858 const SlotIndex CopyIdx = LIS->getInstructionIndex(*CopyMI);
1876 deleteInstr(CopyMI);
1889 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1928 if (reMaterializeTrivialDef(CP, CopyMI, IsDefCopy))
1934 bool Changed = adjustCopiesBackFrom(CP, CopyMI);
1937 std::tie(Changed, Shrink) = removeCopyByCommutingDef(CP, CopyMI);
1939 deleteInstr(CopyMI);
1954 if (removePartialRedundancy(CP, *CopyMI))
1975 // CopyMI has been erased by joinIntervals at this point. Remove it from
1978 ErasedInstrs.erase(CopyMI);
2078 MachineInstr *CopyMI;
2087 CopyMI = MRI->getVRegDef(SrcReg);
2107 CopyMI = &*MRI->use_instr_nodbg_begin(SrcReg);
2108 SlotIndex CopyRegIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot();
2139 deleteInstr(CopyMI);