mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-01 03:33:42 +00:00
Only check if coalescing is worthwhile when the result is targeting a more restrictive register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e2351fa2a
commit
c16d37ead0
@ -1290,8 +1290,13 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec &TheCopy, bool &Again) {
|
||||
}
|
||||
}
|
||||
|
||||
// If we are joining two virtual registers and the resulting register
|
||||
// class is more restrictive (fewer register, smaller size). Check if it's
|
||||
// worth doing the merge.
|
||||
if (!SrcIsPhys && !DstIsPhys &&
|
||||
!isWinToJoinCrossClass(LargeReg, SmallReg, Limit)) {
|
||||
(isExtSubReg || DstRC->isASubClass()) &&
|
||||
!isWinToJoinCrossClass(LargeReg, SmallReg,
|
||||
allocatableRCRegs_[NewRC].count())) {
|
||||
DOUT << "\tSrc/Dest are different register classes.\n";
|
||||
// Allow the coalescer to try again in case either side gets coalesced to
|
||||
// a physical register that's compatible with the other side. e.g.
|
||||
|
Loading…
x
Reference in New Issue
Block a user