forked from OSchip/llvm-project
Handle register masks in DeadMachineInstructionElim.
Don't track live physregs that are clobbered by a register mask operand. llvm-svn: 148588
This commit is contained in:
parent
9139892728
commit
58614f2f5a
|
@ -173,6 +173,13 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
|
|||
*SubRegs; ++SubRegs)
|
||||
LivePhysRegs.reset(*SubRegs);
|
||||
}
|
||||
} else if (MO.isRegMask()) {
|
||||
// Register mask of preserved registers. All clobbers are dead.
|
||||
if (const uint32_t *Mask = MO.getRegMask())
|
||||
LivePhysRegs.clearBitsNotInMask(Mask);
|
||||
else
|
||||
LivePhysRegs.reset();
|
||||
LivePhysRegs |= ReservedRegs;
|
||||
}
|
||||
}
|
||||
// Record the physreg uses, after the defs, in case a physreg is
|
||||
|
|
Loading…
Reference in New Issue