[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue May 25 15:46:01 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.71 -> 1.72
---
Log message:
Be extra paranoid about saving live-in value registers on the stack.
---
Diffs of the changes: (+8 -7)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.71 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.72
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.71 Mon May 24 16:01:25 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Tue May 25 15:43:48 2004
@@ -245,12 +245,13 @@
std::make_pair (V, getValueAllocState (TF, V));
AllocStates.insert (as);
AllocInfo &Source = as.second.first, &Target = as.second.second;
- if (Source != Target)
- if (Source.AllocState == AllocInfo::Allocated) {
- DEBUG (std::cerr << "rewriteProlog: Need to save incoming live value "
- << "in reg " << Source.Placement << " onto the stack\n");
- RegsToSave.insert (Source.Placement);
- }
+ assert (Source.AllocState == AllocInfo::Allocated &&
+ Target.AllocState == AllocInfo::Allocated &&
+ "Only handle live-in values in registers for now!");
+ DEBUG (std::cerr << "rewriteProlog: Need to save incoming live value "
+ << "in reg " << Source.Placement << " onto the stack\n");
+ RegsToSave.insert (Source.Placement);
+ RegsToSave.insert (Target.Placement);
}
// 3. Save used registers onto the stack.
@@ -473,7 +474,7 @@
AllocInfo &Target = ai.first, &Source = ai.second;
assert (Target.AllocState == AllocInfo::Allocated
&& Source.AllocState == AllocInfo::Allocated
- && "FIXME: does not handle live values in stack slots yet");
+ && "FIXME: does not handle live-out values in stack slots yet");
mvec.clear ();
unsigned R = Source.Placement;
unsigned RegType = TRI.getRegType (R);
More information about the llvm-commits
mailing list