[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Mar 31 16:41:01 PST 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.47 -> 1.48
---
Log message:
Clear out prolog and epilog blocks using clear().
---
Diffs of the changes: (+2 -5)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.47 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.48
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.47 Wed Mar 31 15:05:35 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Wed Mar 31 16:40:25 2004
@@ -361,6 +361,7 @@
MachineBasicBlock &E = MF.front (); // E = Entry MBB of MF
std::vector<CopyInfo> EntryCopies;
DEBUG(std::cerr << "UnpackTraceFunction: Modifying entry BB\n");
+ E.clear ();
for (LiveVariableSet::iterator SI = Si.begin (), SE = Si.end (); SI != SE;
++SI) {
// Insert copies from each live-in variable's reg. in the matrix fn.
@@ -400,11 +401,7 @@
&& "Can't find matrix fn BB address to return to from trace");
uint64_t ReturnAddress =
getBasicBlockInfo(TF->ReturnBlockForTraceExit[RBB]).first;
- // Erase the contents of MBB.
- while (!MBB.empty ()) {
- MachineBasicBlock::iterator MBBI = MBB.begin ();
- MBB.erase (MBBI);
- }
+ MBB.clear (); // Empty it out first.
// Insert copies from each live-out variable's reg. in the trace
// to its reg. in the matrix function.
for (LiveVariableSet::iterator SI = So.begin (), SE = So.end ();
More information about the llvm-commits
mailing list