summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-20 08:10:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-20 08:10:37 +0000
commitc8b028daa462e51703815def156e2a3219aa41be (patch)
tree6f0ee14d0256b460b36b26139dbae2565d65fbc5 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent4b0e2a30e0fe55d55d3c0255fa79c14be3138722 (diff)
downloadbcm5719-llvm-c8b028daa462e51703815def156e2a3219aa41be.tar.gz
bcm5719-llvm-c8b028daa462e51703815def156e2a3219aa41be.zip
Don't spill dead def.
llvm-svn: 51305
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 8b25344b477..2558b09ad60 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1562,7 +1562,9 @@ addIntervalsForSpills(const LiveInterval &li,
if (!Folded) {
LiveRange *LR = &nI.ranges[nI.ranges.size()-1];
bool isKill = LR->end == getStoreIndex(index);
- vrm.addSpillPoint(VReg, isKill, MI);
+ if (!MI->registerDefIsDead(nI.reg))
+ // No need to spill a dead def.
+ vrm.addSpillPoint(VReg, isKill, MI);
if (isKill)
AddedKill.insert(&nI);
}
OpenPOWER on IntegriCloud