[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Oct 14 17:00:03 PDT 2003
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.1 -> 1.2
---
Log message:
De-pseudo-ify some code.
---
Diffs of the changes: (+8 -4)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.1 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.2
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.1 Tue Oct 14 16:25:58 2003
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Tue Oct 14 16:58:59 2003
@@ -16,7 +16,7 @@
struct AllocInfo {
// FIXME: this should be the same as what you see in PhyRegAlloc.cpp
- // but with equality/inequality operators
+ // but with equality/inequality operators defined appropriately.
bool operator== (const AllocInfo &X) const { return false; /* FIXME */ }
bool operator!= (const AllocInfo &X) const { return !(*this == X); }
};
@@ -71,9 +71,13 @@
for (MachineFunction::iterator I = MF.begin (), E = MF.end (); I != E; ++I) {
MachineBasicBlock &B = *I;
if (MachineInstr *RI = containsReturnInstruction (B)) {
-#ifdef PSEUDOCODE
- Erase the contents of B;
-#endif
+ // Erase the contents of B
+ while (!B.empty ()) {
+ MachineBasicBlock::iterator MBBI = B.begin ();
+ MachineInstr *MI = *MBBI;
+ B.erase (MBBI);
+ delete MI;
+ }
for (LiveVariableSet::iterator SI = So.begin (), SE = So.end ();
SI != SE; ++SI) {
Value *V = *SI;
More information about the llvm-commits
mailing list