Lines Matching refs:Def

256 static bool shouldRematerialize(const MachineInstr &Def,  in shouldRematerialize()  argument
258 return Def.isAsCheapAsAMove() && TII->isTriviallyReMaterializable(Def); in shouldRematerialize()
268 if (MachineInstr *Def = MRI.getUniqueVRegDef(Reg)) in getVRegDef() local
269 return Def; in getVRegDef()
282 static bool hasOneNonDBGUse(unsigned Reg, MachineInstr *Def, in hasOneNonDBGUse() argument
292 LI.getVNInfoAt(LIS.getInstructionIndex(*Def).getRegSlot()); in hasOneNonDBGUse()
312 static bool isSafeToMove(const MachineOperand *Def, const MachineOperand *Use, in isSafeToMove() argument
316 const MachineInstr *DefI = Def->getParent(); in isSafeToMove()
332 if (Def != DefI->defs().begin()) in isSafeToMove()
521 MachineInstr *Def, MachineBasicBlock &MBB, in moveForSingleUse() argument
525 LLVM_DEBUG(dbgs() << "Move for single use: "; Def->dump()); in moveForSingleUse()
527 WebAssemblyDebugValueManager DefDIs(Def); in moveForSingleUse()
529 LIS.handleMove(*Def); in moveForSingleUse()
547 LI.removeSegment(LIS.getInstructionIndex(*Def).getRegSlot(), in moveForSingleUse()
553 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveForSingleUse()
556 imposeStackOrdering(Def); in moveForSingleUse()
557 return Def; in moveForSingleUse()
570 unsigned Reg, MachineOperand &Op, MachineInstr &Def, MachineBasicBlock &MBB, in rematerializeCheapDef() argument
574 LLVM_DEBUG(dbgs() << "Rematerializing cheap def: "; Def.dump()); in rematerializeCheapDef()
577 WebAssemblyDebugValueManager DefDIs(&Def); in rematerializeCheapDef()
596 IsDead = !LI.liveAt(LIS.getInstructionIndex(Def).getDeadSlot()); in rematerializeCheapDef()
602 SlotIndex Idx = LIS.getInstructionIndex(Def).getRegSlot(); in rematerializeCheapDef()
605 LIS.RemoveMachineInstrFromMaps(Def); 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()
643 WebAssemblyDebugValueManager DefDIs(Def); in moveAndTeeForMultiUse()
645 LIS.handleMove(*Def); in moveAndTeeForMultiUse()
648 MachineOperand &DefMO = Def->getOperand(0); in moveAndTeeForMultiUse()
656 SlotIndex DefIdx = LIS.getInstructionIndex(*Def).getRegSlot(); in moveAndTeeForMultiUse()
671 imposeStackOrdering(Def); in moveAndTeeForMultiUse()
680 LLVM_DEBUG(dbgs() << " - Replaced register: "; Def->dump()); in moveAndTeeForMultiUse()
682 return Def; in moveAndTeeForMultiUse()
867 MachineOperand *Def = DefI->findRegisterDefOperand(Reg); in runOnMachineFunction() local
868 assert(Def != nullptr); in runOnMachineFunction()
877 bool CanMove = SameBlock && isSafeToMove(Def, &Use, Insert, MFI, MRI) && in runOnMachineFunction()