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
This commit is contained in:
Evan Cheng 2007-05-14 21:23:51 +00:00
parent 0dbea33fff
commit 8dfffd5a07

View File

@ -1073,9 +1073,11 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI,
// have clobbered values for this range. // have clobbered values for this range.
if (MRegisterInfo::isPhysicalRegister(repDstReg)) { if (MRegisterInfo::isPhysicalRegister(repDstReg)) {
// Unset unnecessary kills. // Unset unnecessary kills.
for (LiveInterval::Ranges::const_iterator I = SrcInt.begin(), if (!DstInt.containsOneValue()) {
E = SrcInt.end(); I != E; ++I) for (LiveInterval::Ranges::const_iterator I = SrcInt.begin(),
unsetRegisterKills(I->start, I->end, repDstReg); E = SrcInt.end(); I != E; ++I)
unsetRegisterKills(I->start, I->end, repDstReg);
}
// Update the liveintervals of sub-registers. // Update the liveintervals of sub-registers.
for (const unsigned *AS = mri_->getSubRegisters(repDstReg); *AS; ++AS) for (const unsigned *AS = mri_->getSubRegisters(repDstReg); *AS; ++AS)