[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 14 20:16:43 PDT 2004
Changes in directory llvm/lib/CodeGen:
VirtRegMap.cpp updated: 1.30 -> 1.31
---
Log message:
This patch adds and improves debugging output. No functionality changes.
---
Diffs of the changes: (+7 -3)
Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.30 llvm/lib/CodeGen/VirtRegMap.cpp:1.31
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.30 Fri Oct 1 18:16:43 2004
+++ llvm/lib/CodeGen/VirtRegMap.cpp Thu Oct 14 22:16:29 2004
@@ -323,11 +323,13 @@
std::map<int, unsigned>::iterator SSI =
SpillSlotsAvailable.find(StackSlot);
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!
PhysReg = SSI->second;
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
// PhysReg won't be clobbered by a reloaded stack slot that occurs
@@ -519,6 +521,7 @@
// If there is a dead store to this stack slot, nuke it now.
MachineInstr *&LastStore = MaybeDeadStores[StackSlot];
if (LastStore) {
+ DEBUG(std::cerr << " Killed store:\t" << *LastStore);
++NumDSE;
MBB.erase(LastStore);
}
@@ -539,7 +542,8 @@
PhysRegsAvailable[PhysReg] = StackSlot;
SpillSlotsAvailable[StackSlot] = PhysReg;
DEBUG(std::cerr << "Updating SS#" << StackSlot <<" in physreg "
- << MRI->getName(PhysReg) << "\n");
+ << MRI->getName(PhysReg) << " for virtreg #"
+ << VirtReg << "\n");
++NumStores;
VirtReg = PhysReg;
More information about the llvm-commits
mailing list