Made status output debug-only (for testing diffs against lli).
authorMisha Brukman <brukman+llvm@gmail.com>
Fri, 13 Dec 2002 13:15:36 +0000 (13:15 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Fri, 13 Dec 2002 13:15:36 +0000 (13:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5022 91177308-0d34-0410-b5e6-96231b3b80d8

tools/jello/Callback.cpp
tools/jello/Emitter.cpp
tools/jello/GlobalVars.cpp

index 0969f194109b76f0c0a3d938a2bb817cbdc32ffa..b843e106895055d4f1191081e43eb52bf0651cda 100644 (file)
@@ -6,6 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "VM.h"
+#include "Support/Statistic.h"
 #include <signal.h>
 #include <ucontext.h>
 #include <iostream>
@@ -26,10 +27,10 @@ static void TrapHandler(int TN, siginfo_t *SI, ucontext_t *ucp) {
   unsigned RefAddr = *(unsigned*)ucp->uc_mcontext.gregs[REG_ESP];
   RefAddr -= 4;  // Backtrack to the reference itself...
 
-  std::cerr << "In SEGV handler! Addr=0x" << std::hex << RefAddr
-            << " ESP=0x" << ucp->uc_mcontext.gregs[REG_ESP] << std::dec
-            << ": Resolving call to function: "
-            << TheVM->getFunctionReferencedName((void*)RefAddr) << "\n";
+  DEBUG(std::cerr << "In SEGV handler! Addr=0x" << std::hex << RefAddr
+                  << " ESP=0x" << ucp->uc_mcontext.gregs[REG_ESP] << std::dec
+                  << ": Resolving call to function: "
+                  << TheVM->getFunctionReferencedName((void*)RefAddr) << "\n");
 
   // Sanity check to make sure this really is a call instruction...
   assert(((unsigned char*)RefAddr)[-1] == 0xE8 && "Not a call instr!");
index a9cbed5799b8a6002b98bf479dced6112b51bbda..c7876fea9be3c69f05d65e66636633658f4cba11 100644 (file)
@@ -9,6 +9,7 @@
 #include "llvm/CodeGen/MachineCodeEmitter.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/Function.h"
+#include "Support/Statistic.h"
 
 namespace {
   class Emitter : public MachineCodeEmitter {
@@ -61,9 +62,9 @@ void Emitter::finishFunction(MachineFunction &F) {
   BBRefs.clear();
   BBLocations.clear();
 
-  std::cerr << "Finished Code Generation of Function: "
-            << F.getFunction()->getName() << ": " << CurByte-CurBlock
-            << " bytes of text\n";
+  DEBUG(std::cerr << "Finished Code Generation of Function: "
+                  << F.getFunction()->getName() << ": " << CurByte-CurBlock
+                  << " bytes of text\n");
 }
 
 void Emitter::startBasicBlock(MachineBasicBlock &BB) {
index b13511c04600f1b1b732e16b1aca37281f08ad66..77f274295d2d393066709430cc5cacb302bfe844 100644 (file)
@@ -8,6 +8,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Constants.h"
 #include "llvm/Target/TargetMachine.h"
+#include "Support/Statistic.h"
 #include "VM.h"
 #include <iostream>
 
@@ -28,9 +29,9 @@ void VM::emitGlobals() {
       // Allocate some memory for it!
       GlobalAddress[I] = new char[TD.getTypeSize(Ty)];
       
-      std::cerr << "Allocated global '" << I->getName()
-                << "' to addr 0x" << std::hex << GlobalAddress[I] << std::dec
-                << "\n";
+      DEBUG(std::cerr << "Allocated global '" << I->getName()
+                      << "' to addr 0x" << std::hex << GlobalAddress[I] << std::dec
+                      << "\n");
     } else {
       assert(0 && "References to external globals not handled yet!");
     }