Lines Matching defs:CSMI
138 bool PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
340 bool MachineCSE::PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
348 const MachineBasicBlock *CSMBB = CSMI->getParent();
364 MachineBasicBlock::const_iterator I = CSMI; I = std::next(I);
592 MachineInstr *CSMI = Exps[CSVN];
593 if (PhysRegDefsReach(CSMI, &MI, PhysRefs, PhysDefs, CrossMBBPhysDef))
606 MachineInstr *CSMI = Exps[CSVN];
608 LLVM_DEBUG(dbgs() << "*** Found a common subexpression: " << *CSMI);
619 if (MI.isConvergent() && MI.getParent() != CSMI->getParent()) {
636 Register NewReg = CSMI->getOperand(i).getReg();
638 // Go through implicit defs of CSMI and MI, if a def is not dead at MI,
639 // we should make sure it is not dead at CSMI.
640 if (MO.isImplicit() && !MO.isDead() && CSMI->getOperand(i).isDead())
643 // Keep track of implicit defs of CSMI and MI, to clear possibly
656 if (!isProfitableToCSE(NewReg, OldReg, CSMI->getParent(), &MI)) {
690 // Go through implicit defs of CSMI and MI, if a def is not dead at MI,
691 // we should make sure it is not dead at CSMI.
693 CSMI->getOperand(ImplicitDefToUpdate).setIsDead(false);
696 CSMI->getOperand(PhysDef.first).setIsDead(false);
698 // Go through implicit defs of CSMI and MI, and clear the kill flags on
699 // their uses in all the instructions between CSMI and MI.
701 // subs ... implicit-def %nzcv <- CSMI
705 // Since we eliminated MI, and reused a register imp-def'd by CSMI
708 if (CSMI->getParent() == MI.getParent()) {
709 for (MachineBasicBlock::iterator II = CSMI, IE = &MI; II != IE; ++II)