[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Oct 14 12:51:05 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.111 -> 1.112
---
Log message:
Start saving extra space in UTF prolog for "spilled" excess args. We still
need to keep track of where each excess arg goes, though... soon to come.
---
Diffs of the changes: (+11 -6)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.111 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.112
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.111 Thu Sep 2 11:55:44 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Thu Oct 14 14:50:53 2004
@@ -702,14 +702,19 @@
// Calculate the stack size.
// The actual amount we will allocate is (Static Stack Frame Size + Slop +
- // Space for Regs). The Slop = 176 number is from looking at the SparcV9
- // ABI. The Space for Regs = 104 number is the number of 64-bit registers
- // that are known to the SparcV9 backend.
+ // Space for Regs + Space for Spilled Args). The Slop = 176 number is from
+ // looking at the SparcV9 ABI. The Space for Regs = 104 number is the number
+ // of 64-bit registers that are known to the SparcV9 backend. The Space for
+ // Spilled Args number is used to make stack space available to hold live-in
+ // values which would have been allocated to incoming-argument slots in the
+ // caller's stack frame, had we been directly executing the TraceToFunction
+ // output.
StaticStackSize = getStaticStackSize (MF);
- TotalStackSize = (StaticStackSize + 176 + 104 * 8);
+ int SpilledArgsSpace = std::max ((int)TF->TraceFn->asize() - 6, 0) * 8;
+ TotalStackSize = (StaticStackSize + 176 + 104 * 8 + SpilledArgsSpace);
DEBUG(std::cerr << "UnpackTraceFunction: Stack sizes: static = "
- << StaticStackSize << ", total = " << TotalStackSize << "\n");
-
+ << StaticStackSize << ", spilled args = " << SpilledArgsSpace
+ << ", total = " << TotalStackSize << "\n");
bool Changed = false;
for (MachineFunction::iterator I = MF.begin (), E = MF.end (); I != E; ++I)
More information about the llvm-commits
mailing list