[llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Jan 8 16:23:14 PST 2004
Changes in directory reopt/lib/LightWtProfiling:
RuntimeOptimizations.cpp updated: 1.11 -> 1.12
---
Log message:
Use a CachedWriter when printing out the trace basic blocks.
---
Diffs of the changes: (+9 -5)
Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.11 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.12
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.11 Wed Nov 19 16:51:48 2003
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Thu Jan 8 16:22:00 2004
@@ -15,6 +15,7 @@
#include "llvm/PassManager.h"
#include "llvm/BasicBlock.h"
#include "llvm/Analysis/Verifier.h"
+#include "llvm/Assembly/CachedWriter.h"
#include <fstream>
namespace llvm {
@@ -36,17 +37,20 @@
alreadyDone.insert(a);
}
+ if (!M)
+ initModules ();
+
// Dump the trace to the standard error stream if we are in debug mode.
DEBUG(std::cerr << "In optimizeTrace; a = " << a << "\n"
<< "Trace for function " << vBB[0]->getParent ()->getName ()
<< ", blocks:\n");
#ifndef NDEBUG
- for (unsigned i = 0; i < vBB.size (); ++i)
- DEBUG(std::cerr << *vBB[i]);
+ {
+ CachedWriter CW (M, std::cerr);
+ for (unsigned i = 0; i < vBB.size (); ++i)
+ DEBUG(CW << *vBB[i]);
+ }
#endif // NDEBUG
-
- if (!M)
- initModules ();
// Create Trace object.
Trace T (vBB);
More information about the llvm-commits
mailing list