diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-05-20 08:10:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-05-20 08:10:37 +0000 |
commit | b0a6f62c9b2e75fc509d84310a9795ffacbc6796 (patch) | |
tree | db8cef12c8f3cbf2cb705d2bfbe773a8d1a5cf2b /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 6e7b322d36fc9e571cd54cb4b9c6043346a97e3a (diff) |
Don't spill dead def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 8b25344b47..2558b09ad6 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/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); } |