mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 02:28:23 +00:00
Only check if coalescing is worthwhile when the result is targeting a more restrictive register class.
llvm-svn: 62837
This commit is contained in:
parent
4a5296ec5f
commit
8ef6b2d75e
@ -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…
Reference in New Issue
Block a user