Restrict EXTRACT_SUBREG coalescing to avoid negative performance impact.

llvm-svn: 42903
This commit is contained in:
Evan Cheng 2007-10-12 09:15:53 +00:00
parent f8e28b152a
commit 11330f7526
1 changed files with 6 additions and 1 deletions

View File

@ -264,8 +264,13 @@ bool SimpleRegisterCoalescing::JoinCopy(MachineInstr *CopyMI,
if (li_->hasInterval(*SR) && RHS.overlaps(li_->getInterval(*SR))) {
DOUT << "Interfere with sub-register ";
DEBUG(li_->getInterval(*SR).print(DOUT, mri_));
return true;
return true; // Not coalescable
}
} else if (li_->getInterval(repDstReg).getSize() >
li_->getInterval(repSrcReg).getSize()) {
// Be conservative. If both sides are virtual registers, do not coalesce
// if the sub-register live interval is longer.
return false;
}
} else if (differingRegisterClasses(repSrcReg, repDstReg)) {
// If they are not of the same register class, we cannot join them.