mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-14 06:37:33 +00:00
RegisterCoalescer: Improve debug messages
- Show "Considering..." message after flipping so you actually see the final destination vreg as destination. - Add a message on final join, so you can grep for "Success" messages to obtain a list of which register got merged with which. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5522a6b68
commit
6e0f244d1f
@ -1105,6 +1105,11 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// When possible, let DstReg be the larger interval.
|
||||
if (!CP.isPartial() && LIS->getInterval(CP.getSrcReg()).size() >
|
||||
LIS->getInterval(CP.getDstReg()).size())
|
||||
CP.flip();
|
||||
|
||||
DEBUG({
|
||||
dbgs() << "\tConsidering merging to "
|
||||
<< TRI->getRegClassName(CP.getNewRC()) << " with ";
|
||||
@ -1117,11 +1122,6 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
|
||||
dbgs() << PrintReg(CP.getSrcReg(), TRI) << " in "
|
||||
<< PrintReg(CP.getDstReg(), TRI, CP.getSrcIdx()) << '\n';
|
||||
});
|
||||
|
||||
// When possible, let DstReg be the larger interval.
|
||||
if (!CP.isPartial() && LIS->getInterval(CP.getSrcReg()).size() >
|
||||
LIS->getInterval(CP.getDstReg()).size())
|
||||
CP.flip();
|
||||
}
|
||||
|
||||
// Okay, attempt to join these two intervals. On failure, this returns false.
|
||||
@ -1186,7 +1186,9 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
|
||||
TRI->UpdateRegAllocHint(CP.getSrcReg(), CP.getDstReg(), *MF);
|
||||
|
||||
DEBUG({
|
||||
dbgs() << "\tJoined. Result = ";
|
||||
dbgs() << "\tSuccess: " << PrintReg(CP.getSrcReg(), TRI, CP.getSrcIdx())
|
||||
<< " -> " << PrintReg(CP.getDstReg(), TRI, CP.getDstIdx()) << '\n';
|
||||
dbgs() << "\tResult = ";
|
||||
if (CP.isPhys())
|
||||
dbgs() << PrintReg(CP.getDstReg(), TRI);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user