summaryrefslogtreecommitdiffstats
path: root/llvm
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
commite1595b68592842dfa82b11f0d7e5ce8d08eb7646 (patch)
treece38257a1b6af40cf418f258e879d56a7afb5811 /llvm
parent4c28ec187e8b96682dc4998bbe98511c08c14993 (diff)
downloadbcm5719-llvm-e1595b68592842dfa82b11f0d7e5ce8d08eb7646.tar.gz
bcm5719-llvm-e1595b68592842dfa82b11f0d7e5ce8d08eb7646.zip
Only worry about intervening kill if there are more than one live ranges in the interval.
llvm-svn: 37052
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index a996aea4816..00c212d4b80 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud