Lines Matching refs:Add
69 bool noUseOfAddBeforeLoadOrStore(const MachineInstr *Add,
84 MachineInstr *canJoinInstructions(MachineInstr *Ldst, MachineInstr *Add,
182 bool ARCOptAddrMode::noUseOfAddBeforeLoadOrStore(const MachineInstr *Add, in noUseOfAddBeforeLoadOrStore() argument
184 Register R = Add->getOperand(0).getReg(); in noUseOfAddBeforeLoadOrStore()
220 for (auto &Add : MRI->use_nodbg_instructions(B)) { in tryToCombine() local
222 if (!isAddConstantOp(Add, Incr)) in tryToCombine()
228 MachineInstr *MoveTo = canJoinInstructions(&Ldst, &Add, &Uses); in tryToCombine()
233 if (!canFixPastUses(Uses, Add.getOperand(2), B)) in tryToCombine()
236 LLVM_DEBUG(MachineInstr *First = &Ldst; MachineInstr *Last = &Add; in tryToCombine()
244 if (MoveTo == &Add) { in tryToCombine()
246 Add.getParent()->insertAfter(Add.getIterator(), &Ldst); in tryToCombine()
248 if (Result == &Add) in tryToCombine()
255 unsigned NewBaseReg = Add.getOperand(0).getReg(); in tryToCombine()
256 changeToAddrMode(Ldst, NewOpcode, NewBaseReg, Add.getOperand(2)); in tryToCombine()
257 Add.eraseFromParent(); in tryToCombine()
265 ARCOptAddrMode::canJoinInstructions(MachineInstr *Ldst, MachineInstr *Add, in canJoinInstructions() argument
267 assert(Ldst && Add && "NULL instruction passed"); in canJoinInstructions()
269 MachineInstr *First = Add; in canJoinInstructions()
271 if (MDT->dominates(Ldst, Add)) in canJoinInstructions()
273 else if (!MDT->dominates(Add, Ldst)) in canJoinInstructions()
297 if (Add->getOperand(0).getReg() == StReg || BaseReg == StReg) { in canJoinInstructions()
306 if (&MI == Ldst || &MI == Add) in canJoinInstructions()
308 if (&MI != Add && MDT->dominates(Ldst, &MI)) in canJoinInstructions()
312 if (MDT->dominates(Add, &MI)) in canJoinInstructions()
318 if (First == Add) { in canJoinInstructions()
326 } else if (canHoistLoadStoreTo(Ldst, Add)) { in canJoinInstructions()