TwoAddressInstructionPass doesn't remat any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161285
91177308-0d34-0410-b5e6-
96231b3b80d8
// This pass takes the function out of SSA form.
MRI->leaveSSA();
// This pass takes the function out of SSA form.
MRI->leaveSSA();
- // ReMatRegs - Keep track of the registers whose def's are remat'ed.
- BitVector ReMatRegs(MRI->getNumVirtRegs());
-
TiedOperandMap TiedOperands;
SmallPtrSet<MachineInstr*, 8> Processed;
TiedOperandMap TiedOperands;
SmallPtrSet<MachineInstr*, 8> Processed;
- // Some remat'ed instructions are dead.
- for (int i = ReMatRegs.find_first(); i != -1; i = ReMatRegs.find_next(i)) {
- unsigned VReg = TargetRegisterInfo::index2VirtReg(i);
- if (MRI->use_nodbg_empty(VReg)) {
- MachineInstr *DefMI = MRI->getVRegDef(VReg);
- DefMI->eraseFromParent();
- }
- }
-
// Eliminate REG_SEQUENCE instructions. Their whole purpose was to preseve
// SSA form. It's now safe to de-SSA.
MadeChange |= EliminateRegSequences();
// Eliminate REG_SEQUENCE instructions. Their whole purpose was to preseve
// SSA form. It's now safe to de-SSA.
MadeChange |= EliminateRegSequences();