mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
This patch adds and improves debugging output. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -323,11 +323,13 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
|||||||
std::map<int, unsigned>::iterator SSI =
|
std::map<int, unsigned>::iterator SSI =
|
||||||
SpillSlotsAvailable.find(StackSlot);
|
SpillSlotsAvailable.find(StackSlot);
|
||||||
if (SSI != SpillSlotsAvailable.end()) {
|
if (SSI != SpillSlotsAvailable.end()) {
|
||||||
|
DEBUG(std::cerr << "Reusing SS#" << StackSlot << " from physreg "
|
||||||
|
<< MRI->getName(SSI->second) << " for vreg"
|
||||||
|
<< VirtReg <<" instead of reloading into physreg "
|
||||||
|
<< MRI->getName(VRM.getPhys(VirtReg)) << "\n");
|
||||||
// If this stack slot value is already available, reuse it!
|
// If this stack slot value is already available, reuse it!
|
||||||
PhysReg = SSI->second;
|
PhysReg = SSI->second;
|
||||||
MI.SetMachineOperandReg(i, PhysReg);
|
MI.SetMachineOperandReg(i, PhysReg);
|
||||||
DEBUG(std::cerr << "Reusing SS#" << StackSlot << " from physreg "
|
|
||||||
<< MRI->getName(SSI->second) << "\n");
|
|
||||||
|
|
||||||
// The only technical detail we have is that we don't know that
|
// The only technical detail we have is that we don't know that
|
||||||
// PhysReg won't be clobbered by a reloaded stack slot that occurs
|
// PhysReg won't be clobbered by a reloaded stack slot that occurs
|
||||||
@ -519,6 +521,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
|||||||
// If there is a dead store to this stack slot, nuke it now.
|
// If there is a dead store to this stack slot, nuke it now.
|
||||||
MachineInstr *&LastStore = MaybeDeadStores[StackSlot];
|
MachineInstr *&LastStore = MaybeDeadStores[StackSlot];
|
||||||
if (LastStore) {
|
if (LastStore) {
|
||||||
|
DEBUG(std::cerr << " Killed store:\t" << *LastStore);
|
||||||
++NumDSE;
|
++NumDSE;
|
||||||
MBB.erase(LastStore);
|
MBB.erase(LastStore);
|
||||||
}
|
}
|
||||||
@ -539,7 +542,8 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
|||||||
PhysRegsAvailable[PhysReg] = StackSlot;
|
PhysRegsAvailable[PhysReg] = StackSlot;
|
||||||
SpillSlotsAvailable[StackSlot] = PhysReg;
|
SpillSlotsAvailable[StackSlot] = PhysReg;
|
||||||
DEBUG(std::cerr << "Updating SS#" << StackSlot <<" in physreg "
|
DEBUG(std::cerr << "Updating SS#" << StackSlot <<" in physreg "
|
||||||
<< MRI->getName(PhysReg) << "\n");
|
<< MRI->getName(PhysReg) << " for virtreg #"
|
||||||
|
<< VirtReg << "\n");
|
||||||
|
|
||||||
++NumStores;
|
++NumStores;
|
||||||
VirtReg = PhysReg;
|
VirtReg = PhysReg;
|
||||||
|
Reference in New Issue
Block a user