Lines Matching defs:CSMI
112 bool PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
336 bool MachineCSEImpl::PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
344 const MachineBasicBlock *CSMBB = CSMI->getParent();
360 MachineBasicBlock::const_iterator I = CSMI; I = std::next(I);
590 MachineInstr *CSMI = Exps[CSVN];
591 if (PhysRegDefsReach(CSMI, &MI, PhysRefs, PhysDefs, CrossMBBPhysDef))
604 MachineInstr *CSMI = Exps[CSVN];
606 LLVM_DEBUG(dbgs() << "*** Found a common subexpression: " << *CSMI);
617 if (MI.isConvergent() && MI.getParent() != CSMI->getParent()) {
634 Register NewReg = CSMI->getOperand(i).getReg();
636 // Go through implicit defs of CSMI and MI, if a def is not dead at MI,
637 // we should make sure it is not dead at CSMI.
638 if (MO.isImplicit() && !MO.isDead() && CSMI->getOperand(i).isDead())
641 // Keep track of implicit defs of CSMI and MI, to clear possibly
654 if (!isProfitableToCSE(NewReg, OldReg, CSMI->getParent(), &MI)) {
688 // Go through implicit defs of CSMI and MI, if a def is not dead at MI,
689 // we should make sure it is not dead at CSMI.
691 CSMI->getOperand(ImplicitDefToUpdate).setIsDead(false);
694 CSMI->getOperand(PhysDef.first).setIsDead(false);
696 // Go through implicit defs of CSMI and MI, and clear the kill flags on
697 // their uses in all the instructions between CSMI and MI.
699 // subs ... implicit-def %nzcv <- CSMI
703 // Since we eliminated MI, and reused a register imp-def'd by CSMI
706 if (CSMI->getParent() == MI.getParent()) {
707 for (MachineBasicBlock::iterator II = CSMI, IE = &MI; II != IE; ++II)