[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Jun 14 22:52:01 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.83 -> 1.84
---
Log message:
If we see a CALL instruction, save the return address register
---
Diffs of the changes: (+4 -1)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.83 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.84
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.83 Fri Jun 11 15:54:18 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Mon Jun 14 22:51:38 2004
@@ -75,7 +75,9 @@
for (MachineFunction::iterator fi = MF.begin (), fe = MF.end ();
fi != fe; ++fi)
for (MachineBasicBlock::iterator bi = fi->begin (), be = fi->end ();
- bi != be; ++bi)
+ bi != be; ++bi) {
+ if (bi->getOpcode () == V9::CALL)
+ RegsToSave.insert (SparcV9::o7); // save return-address register
for (unsigned oi = 0, oe = bi->getNumOperands (); oi != oe; ++oi) {
const MachineOperand &MO = bi->getOperand (oi);
if (MO.isDef ()) {
@@ -91,6 +93,7 @@
}
}
}
+ }
// Deal with some sparc lunacy: If any of the floatcc regs are used, then we
// only put %fsr in the set, not the floatcc regs which were actually used.
More information about the llvm-commits
mailing list