summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-04-26 23:14:29 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-04-26 23:14:29 +0000
commit08e79990a0a8c40e1ebed0b8f90f993ea792cac7 (patch)
tree3da9ab9319f0bc86031f63bcfc097f1ec81cf3d8 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent3f192450151f4ed9eb656037193651781adf7d41 (diff)
downloadbcm5719-llvm-08e79990a0a8c40e1ebed0b8f90f993ea792cac7.tar.gz
bcm5719-llvm-08e79990a0a8c40e1ebed0b8f90f993ea792cac7.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 8b3f01fe58c..58e71bbe2e2 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -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;
OpenPOWER on IntegriCloud