aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2002-12-13 13:15:36 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2002-12-13 13:15:36 +0000
commite4bdfa6353bbdf38eaa90b2bf254078c23cb4dbe (patch)
treeb7111a7e8715e811ba9c3c7d0c3bfd12fd4b4602 /tools
parent202a2d0e17d4f7d05da3aee2d573f3754d842883 (diff)
downloadexternal_llvm-e4bdfa6353bbdf38eaa90b2bf254078c23cb4dbe.zip
external_llvm-e4bdfa6353bbdf38eaa90b2bf254078c23cb4dbe.tar.gz
external_llvm-e4bdfa6353bbdf38eaa90b2bf254078c23cb4dbe.tar.bz2
Made status output debug-only (for testing diffs against lli).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/jello/Callback.cpp9
-rw-r--r--tools/jello/Emitter.cpp7
-rw-r--r--tools/jello/GlobalVars.cpp7
3 files changed, 13 insertions, 10 deletions
diff --git a/tools/jello/Callback.cpp b/tools/jello/Callback.cpp
index 0969f19..b843e10 100644
--- a/tools/jello/Callback.cpp
+++ b/tools/jello/Callback.cpp
@@ -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!");
diff --git a/tools/jello/Emitter.cpp b/tools/jello/Emitter.cpp
index a9cbed5..c7876fe 100644
--- a/tools/jello/Emitter.cpp
+++ b/tools/jello/Emitter.cpp
@@ -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) {
diff --git a/tools/jello/GlobalVars.cpp b/tools/jello/GlobalVars.cpp
index b13511c..77f2742 100644
--- a/tools/jello/GlobalVars.cpp
+++ b/tools/jello/GlobalVars.cpp
@@ -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!");
}