[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Oct 14 22:26:10 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.114 -> 1.115
---
Log message:
Since I seem to be too woozy to write code tonight, here's a description
in English of how placeSpilledArgs ought to work.
---
Diffs of the changes: (+22 -0)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.114 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.115
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.114 Fri Oct 15 00:03:04 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Fri Oct 15 00:25:59 2004
@@ -624,8 +624,30 @@
BuildMI (&MBB, V9::NOP, 0);
}
+/// placeSpilledArgs - Relocate excess TraceFn args, which were
+/// probably allocated to excess-incoming-arg stack slots, which are
+/// supposed to be allocated by the caller. Since we don't have a typical
+/// caller's stack frame, we need to relocate the excess args into our own
+/// stack frame.
void UnpackTraceFunction::placeSpilledArgs () {
SpilledArgMap.clear ();
+ for (unsigned a = 6, s = TF->TraceFn->asize(); a < s; ++a) {
+ // Get old position for argument #a using GetValueAllocState. If it
+ // is not spilled in the TraceFn to an offset which is > 2047, then
+ // it isn't in an invalid region of the stack frame, and we don't
+ // have to relocate it.
+
+ // Find a new position for argument #a by using a similar formula to
+ // that of stackOffsetForReg(). For the formula's purposes, we can
+ // treat excess args as being "registers" numbered starting with
+ // SparcV9::fsr + 1.
+
+ // Use the new position (which is relative to sp) to calculate an
+ // offset from fp instead, by subtracting the TotalStackSize. The
+ // result should be > 0 and < 2047.
+
+ // Put the <old position, new position> pair into the SpilledArgMap.
+ }
// FIXME - implement
}
More information about the llvm-commits
mailing list