[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu May 20 13:06:02 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.62 -> 1.63
---
Log message:
We were restoring fp without saving it in the first place. This was
causing a crash on return from the MatrixFn, when it tried to RESTORE
its caller's stack.
---
Diffs of the changes: (+5 -0)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.62 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.63
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.62 Thu May 20 12:11:48 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Thu May 20 13:05:22 2004
@@ -226,6 +226,10 @@
regsUsed.insert (SparcV9::fsr);
if (intCCRegSeen)
regsUsed.insert (SparcV9::ccr);
+
+ // Always put fp in the set because it is restored unconditionally.
+ static const unsigned fp = SparcV9::i6;
+ regsUsed.insert (fp);
}
void UnpackTraceFunction::rewriteProlog (MachineFunction &MF,
@@ -485,6 +489,7 @@
for (std::vector<MachineInstr *>::iterator vi = mvec.begin (),
ve = mvec.end (); vi != ve; ++vi)
MBB.push_back (*vi);
+ regsUsed.erase (fp);
// Insert copies from each live-out variable's reg. in the trace
// to its reg. in the matrix function.
More information about the llvm-commits
mailing list