Lines Matching refs:Add
80 bool noUseOfAddBeforeLoadOrStore(const MachineInstr *Add,
95 MachineInstr *canJoinInstructions(MachineInstr *Ldst, MachineInstr *Add,
192 bool ARCOptAddrMode::noUseOfAddBeforeLoadOrStore(const MachineInstr *Add, in noUseOfAddBeforeLoadOrStore() argument
194 Register R = Add->getOperand(0).getReg(); in noUseOfAddBeforeLoadOrStore()
230 for (auto &Add : MRI->use_nodbg_instructions(B)) { in tryToCombine() local
232 if (!isAddConstantOp(Add, Incr)) in tryToCombine()
238 MachineInstr *MoveTo = canJoinInstructions(&Ldst, &Add, &Uses); in tryToCombine()
243 if (!canFixPastUses(Uses, Add.getOperand(2), B)) in tryToCombine()
246 LLVM_DEBUG(MachineInstr *First = &Ldst; MachineInstr *Last = &Add; in tryToCombine()
254 if (MoveTo == &Add) { in tryToCombine()
256 Add.getParent()->insertAfter(Add.getIterator(), &Ldst); in tryToCombine()
258 if (Result == &Add) in tryToCombine()
265 unsigned NewBaseReg = Add.getOperand(0).getReg(); in tryToCombine()
266 changeToAddrMode(Ldst, NewOpcode, NewBaseReg, Add.getOperand(2)); in tryToCombine()
267 Add.eraseFromParent(); in tryToCombine()
275 ARCOptAddrMode::canJoinInstructions(MachineInstr *Ldst, MachineInstr *Add, in canJoinInstructions() argument
277 assert(Ldst && Add && "NULL instruction passed"); in canJoinInstructions()
279 MachineInstr *First = Add; in canJoinInstructions()
281 if (MDT->dominates(Ldst, Add)) in canJoinInstructions()
283 else if (!MDT->dominates(Add, Ldst)) in canJoinInstructions()
307 if (Add->getOperand(0).getReg() == StReg || BaseReg == StReg) { in canJoinInstructions()
316 if (&MI == Ldst || &MI == Add) in canJoinInstructions()
318 if (&MI != Add && MDT->dominates(Ldst, &MI)) in canJoinInstructions()
322 if (MDT->dominates(Add, &MI)) in canJoinInstructions()
328 if (First == Add) { in canJoinInstructions()
336 } else if (canHoistLoadStoreTo(Ldst, Add)) { in canJoinInstructions()