mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 21:20:37 +00:00
Track live-out physical registers in MachineDCE.
Patch by Sanjoy Das! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9174d5c738
commit
f27229ee5a
@ -110,9 +110,14 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
|
||||
LivePhysRegs.set(Reg);
|
||||
}
|
||||
|
||||
// FIXME: Add live-ins from sucessors to LivePhysRegs. Normally, physregs
|
||||
// are not live across blocks, but some targets (x86) can have flags live
|
||||
// out of a block.
|
||||
// Add live-ins from sucessors to LivePhysRegs. Normally, physregs are not
|
||||
// live across blocks, but some targets (x86) can have flags live out of a
|
||||
// block.
|
||||
for (MachineBasicBlock::succ_iterator S = MBB->succ_begin(),
|
||||
E = MBB->succ_end(); S != E; S++)
|
||||
for (MachineBasicBlock::livein_iterator LI = (*S)->livein_begin();
|
||||
LI != (*S)->livein_end(); LI++)
|
||||
LivePhysRegs.set(*LI);
|
||||
|
||||
// Now scan the instructions and delete dead ones, tracking physreg
|
||||
// liveness as we go.
|
||||
|
Loading…
Reference in New Issue
Block a user