Lines Matching refs:I2

100   void combine(MachineInstr &I1, MachineInstr &I2,
104 bool isSafeToMoveTogether(MachineInstr &I1, MachineInstr &I2,
247 /// isSafeToMoveTogether - Returns true if it is safe to move I1 next to I2 such
250 MachineInstr &I2,
254 unsigned I2UseReg = UseReg(I2.getOperand(1));
256 // It is not safe to move I1 and I2 into one combine if I2 has a true
263 // First try to move I2 towards I1.
265 // A reverse_iterator instantiated like below starts before I2, and I1
267 // Look at instructions I in between I2 and (excluding) I1.
268 MachineBasicBlock::reverse_iterator I(I2),
273 // If I2 kills its operand and we move I2 over an instruction that also
274 // uses I2's use reg we need to modify that (first) instruction to now kill
277 if (I2.killsRegister(I2UseReg))
283 // * modifies I2's use reg
284 // * modifies I2's def reg
285 // * reads I2's def reg
287 // we can't move I2 across it.
307 removeKillInfo(I2, KilledOperand);
314 // Try to move I1 towards I2.
316 // Look at instructions I in between I1 and (excluding) I2.
317 MachineBasicBlock::iterator I(I1), End(I2);
320 End = std::next(MachineBasicBlock::iterator(I2));
347 if (MI.readsRegister(I1DestReg, TRI)) // Move this instruction after I2.
488 MachineInstr *I2 = findPairable(I1, DoInsertAtI1, OptForSize);
489 if (I2) {
491 combine(I1, *I2, MI, DoInsertAtI1, OptForSize);
506 MachineBasicBlock::iterator I2 = std::next(MachineBasicBlock::iterator(I1));
508 while (I2->isDebugValue())
509 ++I2;
513 for (MachineBasicBlock::iterator End = I1.getParent()->end(); I2 != End;
514 ++I2) {
516 if (I2->modifiesRegister(I1DestReg, TRI))
520 if (!isCombinableInstType(*I2, TII, ShouldCombineAggressively))
524 if (ShouldCombineAggressively && PotentiallyNewifiableTFR.count(&*I2))
527 unsigned I2DestReg = I2->getOperand(0).getReg();
541 if ((IsI2LowReg && !areCombinableOperations(TRI, I1, *I2, AllowC64)) ||
542 (IsI1LowReg && !areCombinableOperations(TRI, *I2, I1, AllowC64)))
545 if (isSafeToMoveTogether(I1, *I2, I1DestReg, I2DestReg, DoInsertAtI1))
546 return &*I2;
554 void HexagonCopyToCombine::combine(MachineInstr &I1, MachineInstr &I2,
557 // We are going to delete I2. If MI points to I2 advance it to the next
559 if (MI == I2.getIterator())
562 // Figure out whether I1 or I2 goes into the lowreg part.
564 unsigned I2DestReg = I2.getOperand(0).getReg();
576 MachineOperand &LoOperand = IsI1Loreg ? I1.getOperand(1) : I2.getOperand(1);
577 MachineOperand &HiOperand = IsI1Loreg ? I2.getOperand(1) : I1.getOperand(1);
585 isGreaterThanNBitTFRI<16>(I1) && isGreaterThanNBitTFRI<16>(I2);
587 MachineBasicBlock::iterator InsertPt(DoInsertAtI1 ? I1 : I2);
601 // moved towards I2.
603 // Insert debug instructions at the new location before I2.
615 I2.eraseFromParent();