Lines Matching defs:I2

94   void combine(MachineInstr &I1, MachineInstr &I2,
98 bool isSafeToMoveTogether(MachineInstr &I1, MachineInstr &I2,
256 /// isSafeToMoveTogether - Returns true if it is safe to move I1 next to I2 such
259 MachineInstr &I2,
263 Register I2UseReg = UseReg(I2.getOperand(1));
265 // It is not safe to move I1 and I2 into one combine if I2 has a true
272 // First try to move I2 towards I1.
274 // A reverse_iterator instantiated like below starts before I2, and I1
276 // Look at instructions I in between I2 and (excluding) I1.
277 MachineBasicBlock::reverse_iterator I = ++I2.getIterator().getReverse();
282 // If I2 kills its operand and we move I2 over an instruction that also
283 // uses I2's use reg we need to modify that (first) instruction to now kill
286 if (I2.killsRegister(I2UseReg, /*TRI=*/nullptr))
292 // * modifies I2's use reg
293 // * modifies I2's def reg
294 // * reads I2's def reg
296 // we can't move I2 across it.
316 removeKillInfo(I2, KilledOperand);
323 // Try to move I1 towards I2.
325 // Look at instructions I in between I1 and (excluding) I2.
326 MachineBasicBlock::iterator I(I1), End(I2);
329 End = std::next(MachineBasicBlock::iterator(I2));
356 if (MI.readsRegister(I1DestReg, TRI)) // Move this instruction after I2.
505 MachineInstr *I2 = findPairable(I1, DoInsertAtI1, OptForSize);
506 if (I2) {
508 combine(I1, *I2, MI, DoInsertAtI1, OptForSize);
523 MachineBasicBlock::iterator I2 = std::next(MachineBasicBlock::iterator(I1));
524 while (I2 != I1.getParent()->end() && I2->isDebugInstr())
525 ++I2;
529 for (MachineBasicBlock::iterator End = I1.getParent()->end(); I2 != End;
530 ++I2) {
532 if (I2->modifiesRegister(I1DestReg, TRI))
536 if (!isCombinableInstType(*I2, TII, ShouldCombineAggressively))
540 if (ShouldCombineAggressively && PotentiallyNewifiableTFR.count(&*I2))
543 Register I2DestReg = I2->getOperand(0).getReg();
556 if ((IsI2LowReg && !areCombinableOperations(TRI, I1, *I2, AllowC64)) ||
557 (IsI1LowReg && !areCombinableOperations(TRI, *I2, I1, AllowC64)))
560 if (isSafeToMoveTogether(I1, *I2, I1DestReg, I2DestReg, DoInsertAtI1))
561 return &*I2;
569 void HexagonCopyToCombine::combine(MachineInstr &I1, MachineInstr &I2,
572 // We are going to delete I2. If MI points to I2 advance it to the next
574 if (MI == I2.getIterator())
577 // Figure out whether I1 or I2 goes into the lowreg part.
579 Register I2DestReg = I2.getOperand(0).getReg();
600 MachineOperand &LoOperand = IsI1Loreg ? I1.getOperand(1) : I2.getOperand(1);
601 MachineOperand &HiOperand = IsI1Loreg ? I2.getOperand(1) : I1.getOperand(1);
609 isGreaterThanNBitTFRI<16>(I1) && isGreaterThanNBitTFRI<16>(I2);
611 MachineBasicBlock::iterator InsertPt(DoInsertAtI1 ? I1 : I2);
625 // moved towards I2.
627 // Insert debug instructions at the new location before I2.
639 I2.eraseFromParent();