Lines Matching refs:Def
263 static bool shouldRematerialize(const MachineInstr &Def, AliasAnalysis &AA, in shouldRematerialize() argument
265 return Def.isAsCheapAsAMove() && TII->isTriviallyReMaterializable(Def, &AA); in shouldRematerialize()
275 if (MachineInstr *Def = MRI.getUniqueVRegDef(Reg)) in getVRegDef() local
276 return Def; in getVRegDef()
289 static bool hasOneUse(unsigned Reg, MachineInstr *Def, MachineRegisterInfo &MRI, in hasOneUse() argument
298 LI.getVNInfoAt(LIS.getInstructionIndex(*Def).getRegSlot()); in hasOneUse()
318 static bool isSafeToMove(const MachineOperand *Def, const MachineOperand *Use, in isSafeToMove() argument
322 const MachineInstr *DefI = Def->getParent(); in isSafeToMove()
338 if (Def != DefI->defs().begin()) in isSafeToMove()
520 MachineInstr *Def, MachineBasicBlock &MBB, in moveForSingleUse() argument
524 LLVM_DEBUG(dbgs() << "Move for single use: "; Def->dump()); in moveForSingleUse()
526 WebAssemblyDebugValueManager DefDIs(Def); in moveForSingleUse()
527 MBB.splice(Insert, &MBB, Def); in moveForSingleUse()
529 LIS.handleMove(*Def); in moveForSingleUse()
539 Def->getOperand(0).setReg(NewReg); in moveForSingleUse()
547 LI.removeSegment(LIS.getInstructionIndex(*Def).getRegSlot(), in moveForSingleUse()
555 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveForSingleUse()
558 imposeStackOrdering(Def); in moveForSingleUse()
559 return Def; in moveForSingleUse()
565 unsigned Reg, MachineOperand &Op, MachineInstr &Def, MachineBasicBlock &MBB, in rematerializeCheapDef() argument
569 LLVM_DEBUG(dbgs() << "Rematerializing cheap def: "; Def.dump()); in rematerializeCheapDef()
572 WebAssemblyDebugValueManager DefDIs(&Def); in rematerializeCheapDef()
575 TII->reMaterialize(MBB, Insert, NewReg, 0, Def, *TRI); in rematerializeCheapDef()
590 IsDead = !LI.liveAt(LIS.getInstructionIndex(Def).getDeadSlot()); in rematerializeCheapDef()
597 SlotIndex Idx = LIS.getInstructionIndex(Def).getRegSlot(); in rematerializeCheapDef()
600 LIS.RemoveMachineInstrFromMaps(Def); in rematerializeCheapDef()
601 Def.eraseFromParent(); in rematerializeCheapDef()
633 unsigned Reg, MachineOperand &Op, MachineInstr *Def, MachineBasicBlock &MBB, in moveAndTeeForMultiUse() argument
636 LLVM_DEBUG(dbgs() << "Move and tee for multi-use:"; Def->dump()); in moveAndTeeForMultiUse()
638 WebAssemblyDebugValueManager DefDIs(Def); in moveAndTeeForMultiUse()
641 MBB.splice(Insert, &MBB, Def); in moveAndTeeForMultiUse()
642 LIS.handleMove(*Def); in moveAndTeeForMultiUse()
648 MachineOperand &DefMO = Def->getOperand(0); in moveAndTeeForMultiUse()
656 SlotIndex DefIdx = LIS.getInstructionIndex(*Def).getRegSlot(); in moveAndTeeForMultiUse()
673 imposeStackOrdering(Def); in moveAndTeeForMultiUse()
679 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveAndTeeForMultiUse()
681 return Def; in moveAndTeeForMultiUse()
886 MachineOperand *Def = DefI->findRegisterDefOperand(Reg); in runOnMachineFunction() local
887 assert(Def != nullptr); in runOnMachineFunction()
897 isSafeToMove(Def, &Use, Insert, AA, MFI, MRI) && in runOnMachineFunction()