mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 05:55:40 +00:00
Avoid deleting extra copies when RegistersDefinedFromSameValue is true.
This function adds copies to be erased to DupCopies, avoid also adding them to DeadCopies. llvm-svn: 157147
This commit is contained in:
parent
04202f992f
commit
72efb98f61
@ -1310,9 +1310,10 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
||||
|
||||
// DstReg is known to be a register in the LHS interval. If the src is
|
||||
// from the RHS interval, we can use its value #.
|
||||
if (!CP.isCoalescable(MI) &&
|
||||
!RegistersDefinedFromSameValue(*LIS, *TRI, CP, VNI, OtherVNI,
|
||||
DupCopies))
|
||||
if (CP.isCoalescable(MI))
|
||||
DeadCopies.push_back(MI);
|
||||
else if (!RegistersDefinedFromSameValue(*LIS, *TRI, CP, VNI, OtherVNI,
|
||||
DupCopies))
|
||||
continue;
|
||||
|
||||
LHSValsDefinedFromRHS[VNI] = OtherVNI;
|
||||
@ -1339,13 +1340,13 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
||||
|
||||
// DstReg is known to be a register in the RHS interval. If the src is
|
||||
// from the LHS interval, we can use its value #.
|
||||
if (!CP.isCoalescable(MI) &&
|
||||
!RegistersDefinedFromSameValue(*LIS, *TRI, CP, VNI, OtherVNI,
|
||||
DupCopies))
|
||||
if (CP.isCoalescable(MI))
|
||||
DeadCopies.push_back(MI);
|
||||
else if (!RegistersDefinedFromSameValue(*LIS, *TRI, CP, VNI, OtherVNI,
|
||||
DupCopies))
|
||||
continue;
|
||||
|
||||
RHSValsDefinedFromLHS[VNI] = OtherVNI;
|
||||
DeadCopies.push_back(MI);
|
||||
}
|
||||
|
||||
LHSValNoAssignments.resize(LHS.getNumValNums(), -1);
|
||||
|
Loading…
Reference in New Issue
Block a user