aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-14 21:23:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-14 21:23:51 +0000
commit8dfffd5a079c35e317b843f9f249d2fa36bcd944 (patch)
tree00b3b456644b344107628a571098a3ecd3eaa2b6 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent0dbea33fff860b4d0df030ad9b29f70a2a58b4e1 (diff)
downloadexternal_llvm-8dfffd5a079c35e317b843f9f249d2fa36bcd944.zip
external_llvm-8dfffd5a079c35e317b843f9f249d2fa36bcd944.tar.gz
external_llvm-8dfffd5a079c35e317b843f9f249d2fa36bcd944.tar.bz2
Only worry about intervening kill if there are more than one live ranges in the interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index a996aea..00c212d 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1073,9 +1073,11 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI,
// have clobbered values for this range.
if (MRegisterInfo::isPhysicalRegister(repDstReg)) {
// Unset unnecessary kills.
- for (LiveInterval::Ranges::const_iterator I = SrcInt.begin(),
- E = SrcInt.end(); I != E; ++I)
- unsetRegisterKills(I->start, I->end, repDstReg);
+ if (!DstInt.containsOneValue()) {
+ for (LiveInterval::Ranges::const_iterator I = SrcInt.begin(),
+ E = SrcInt.end(); I != E; ++I)
+ unsetRegisterKills(I->start, I->end, repDstReg);
+ }
// Update the liveintervals of sub-registers.
for (const unsigned *AS = mri_->getSubRegisters(repDstReg); *AS; ++AS)