Lines Matching defs:I1

89   MachineInstr *findPairable(MachineInstr &I1, bool &DoInsertAtI1,
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
258 bool HexagonCopyToCombine::isSafeToMoveTogether(MachineInstr &I1,
265 // It is not safe to move I1 and I2 into one combine if I2 has a true
266 // dependence on I1.
267 if (I2UseReg && I1.modifiesRegister(I2UseReg, TRI))
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.
278 MachineBasicBlock::reverse_iterator End = I1.getIterator().getReverse();
281 End = ++I1.getIterator().getReverse();
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);
330 Register I1UseReg = UseReg(I1.getOperand(1));
332 // operand, we need to update the kill information on the moved I1. It kills
340 // * modifies I1's use reg
341 // * modifies I1's def reg
342 // * reads I1's def reg
347 // * or has a killed aliased register use of I1's use reg
354 // we can't move I1 across it.
376 // Update I1 to set the kill flag. This flag will later be picked up by
378 bool Added = I1.addRegisterKilled(KilledOperand, TRI);
485 MachineInstr &I1 = *MI++;
487 if (I1.isDebugInstr())
493 if (ShouldCombineAggressively && PotentiallyNewifiableTFR.count(&I1))
497 if (!isCombinableInstType(I1, TII, ShouldCombineAggressively))
505 MachineInstr *I2 = findPairable(I1, DoInsertAtI1, OptForSize);
508 combine(I1, *I2, MI, DoInsertAtI1, OptForSize);
516 /// findPairable - Returns an instruction that can be merged with \p I1 into a
518 /// in \p DoInsertAtI1 if the combine must be inserted at instruction \p I1
520 MachineInstr *HexagonCopyToCombine::findPairable(MachineInstr &I1,
523 MachineBasicBlock::iterator I2 = std::next(MachineBasicBlock::iterator(I1));
524 while (I2 != I1.getParent()->end() && I2->isDebugInstr())
527 Register I1DestReg = I1.getOperand(0).getReg();
529 for (MachineBasicBlock::iterator End = I1.getParent()->end(); I2 != End;
556 if ((IsI2LowReg && !areCombinableOperations(TRI, I1, *I2, AllowC64)) ||
557 (IsI1LowReg && !areCombinableOperations(TRI, *I2, I1, AllowC64)))
560 if (isSafeToMoveTogether(I1, *I2, I1DestReg, I2DestReg, DoInsertAtI1))
569 void HexagonCopyToCombine::combine(MachineInstr &I1, MachineInstr &I2,
577 // Figure out whether I1 or I2 goes into the lowreg part.
578 Register I1DestReg = I1.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);
624 // Move debug instructions along with I1 if it's being
638 I1.eraseFromParent();