mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
Delete a dead variable.
TwoAddressInstructionPass doesn't remat any more. llvm-svn: 161285
This commit is contained in:
parent
69611c470c
commit
d5b3babd6f
@ -1387,9 +1387,6 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &Func) {
|
||||
// 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;
|
||||
@ -1478,15 +1475,6 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &Func) {
|
||||
}
|
||||
}
|
||||
|
||||
// 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user