[MachineBasicBlock] Take advantage of the partially dead information.

Thanks to that information we wouldn't lie on a register being live whereas it
is not.

llvm-svn: 267622
This commit is contained in:
Quentin Colombet
2016-04-26 23:14:29 +00:00
parent 3f19245015
commit 08e79990a0
2 changed files with 10 additions and 4 deletions

View File

@@ -1208,8 +1208,15 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI,
if (Info.DeadDef)
return LQR_Dead;
// Register is (at least partially) live after a def.
if (Info.Defined)
return LQR_Live;
if (Info.Defined) {
if (!Info.PartialDeadDef)
return LQR_Live;
// As soon as we saw a partial definition (dead or not),
// we cannot tell if the value is partial live without
// tracking the lanemasks. We are not going to do this,
// so fall back on the remaining of the analysis.
break;
}
// Register is dead after a full kill or clobber and no def.
if (Info.Killed || Info.Clobbered)
return LQR_Dead;