Lines Matching refs:Def

257 static bool shouldRematerialize(const MachineInstr &Def,  in shouldRematerialize()  argument
259 return Def.isAsCheapAsAMove() && TII->isTriviallyReMaterializable(Def); in shouldRematerialize()
269 if (MachineInstr *Def = MRI.getUniqueVRegDef(Reg)) in getVRegDef() local
270 return Def; in getVRegDef()
283 static bool hasOneNonDBGUse(unsigned Reg, MachineInstr *Def, in hasOneNonDBGUse() argument
293 LI.getVNInfoAt(LIS.getInstructionIndex(*Def).getRegSlot()); in hasOneNonDBGUse()
313 static bool isSafeToMove(const MachineOperand *Def, const MachineOperand *Use, in isSafeToMove() argument
317 const MachineInstr *DefI = Def->getParent(); in isSafeToMove()
333 if (Def != DefI->defs().begin()) in isSafeToMove()
524 MachineInstr *Def, MachineBasicBlock &MBB, in moveForSingleUse() argument
528 LLVM_DEBUG(dbgs() << "Move for single use: "; Def->dump()); in moveForSingleUse()
530 WebAssemblyDebugValueManager DefDIs(Def); in moveForSingleUse()
532 LIS.handleMove(*Def); in moveForSingleUse()
550 LI.removeSegment(LIS.getInstructionIndex(*Def).getRegSlot(), in moveForSingleUse()
556 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveForSingleUse()
559 imposeStackOrdering(Def); in moveForSingleUse()
560 return Def; in moveForSingleUse()
573 unsigned Reg, MachineOperand &Op, MachineInstr &Def, MachineBasicBlock &MBB, in rematerializeCheapDef() argument
577 LLVM_DEBUG(dbgs() << "Rematerializing cheap def: "; Def.dump()); in rematerializeCheapDef()
580 WebAssemblyDebugValueManager DefDIs(&Def); in rematerializeCheapDef()
599 IsDead = !LI.liveAt(LIS.getInstructionIndex(Def).getDeadSlot()); in rematerializeCheapDef()
605 SlotIndex Idx = LIS.getInstructionIndex(Def).getRegSlot(); in rematerializeCheapDef()
608 LIS.RemoveMachineInstrFromMaps(Def); in rematerializeCheapDef()
636 unsigned Reg, MachineOperand &Op, MachineInstr *Def, MachineBasicBlock &MBB, in moveAndTeeForMultiUse() argument
639 LLVM_DEBUG(dbgs() << "Move and tee for multi-use:"; Def->dump()); in moveAndTeeForMultiUse()
646 WebAssemblyDebugValueManager DefDIs(Def); in moveAndTeeForMultiUse()
648 LIS.handleMove(*Def); in moveAndTeeForMultiUse()
651 MachineOperand &DefMO = Def->getOperand(0); in moveAndTeeForMultiUse()
659 SlotIndex DefIdx = LIS.getInstructionIndex(*Def).getRegSlot(); in moveAndTeeForMultiUse()
674 imposeStackOrdering(Def); in moveAndTeeForMultiUse()
683 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveAndTeeForMultiUse()
685 return Def; in moveAndTeeForMultiUse()
870 MachineOperand *Def = in runOnMachineFunction() local
872 assert(Def != nullptr); in runOnMachineFunction()
881 bool CanMove = SameBlock && isSafeToMove(Def, &Use, Insert, MFI, MRI) && in runOnMachineFunction()