[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Mon Aug 18 15:38:01 PDT 2003


Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:

RuntimeOptimizations.cpp updated: 1.1 -> 1.2

---
Log message:

Fix the order of the #includes to match the other files.
Include Support/Debug.h.
Turn #ifdef GET_ALL_INFO...#endif into DEBUG(...).


---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp
diff -u llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp:1.1 llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp:1.2
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp:1.1	Tue Aug 12 22:07:02 2003
+++ llvm/lib/Reoptimizer/LightWtProfiling/Trigger/RuntimeOptimizations.cpp	Mon Aug 18 15:37:31 2003
@@ -6,10 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/PassManager.h"
-#include "llvm/BasicBlock.h"
 #include "GetTimer.h"
 #include "Globals.h"
+#include "Support/Debug.h"
+#include "llvm/PassManager.h"
+#include "llvm/BasicBlock.h"
 
 // From Initialization.cpp
 extern void initModules ();
@@ -20,16 +21,17 @@
 /// addresses for the trace.
 ///
 void optimizeTrace (std::vector<BasicBlock *> &vBB, uint64_t a) {
-#ifdef GET_ALL_INFO
-  // Dump the trace to the standard error stream. 
-  std::cerr << "=== In optimizeTrace; a = " << a << "================\n";
-  std::cerr << "--- Function where the trace starts -----------------\n";
-  std::cerr << vBB[0]->getParent ();
-  std::cerr << "--- BasicBlocks in the trace ------------------------\n";
+  // Dump the trace to the standard error stream if we are in debug mode.
+  DEBUG(std::cerr << "=== In optimizeTrace; a = " << a << "================\n"
+	<< "--- Function where the trace starts -----------------\n"
+	<< vBB[0]->getParent ()
+	<< "--- BasicBlocks in the trace ------------------------\n");
+#ifndef NDEBUG
   for (unsigned i = 0; i < vBB.size (); ++i)
-    std::cerr << *vBB[i];
-  std::cerr << "=====================================================\n";
-#endif // GET_ALL_INFO
+    DEBUG(std::cerr << *vBB[i]);
+#endif // NDEBUG
+  DEBUG(std::cerr << "=====================================================\n");
+
   if (!M)
     initModules ();
 





More information about the llvm-commits mailing list