[llvm-commits] CVS: llvm/tools/jello/Callback.cpp Emitter.cpp GlobalVars.cpp
Misha Brukman
brukman at cs.uiuc.edu
Fri Dec 13 07:16:01 PST 2002
Changes in directory llvm/tools/jello:
Callback.cpp updated: 1.2 -> 1.3
Emitter.cpp updated: 1.4 -> 1.5
GlobalVars.cpp updated: 1.2 -> 1.3
---
Log message:
Made status output debug-only (for testing diffs against lli).
---
Diffs of the changes:
Index: llvm/tools/jello/Callback.cpp
diff -u llvm/tools/jello/Callback.cpp:1.2 llvm/tools/jello/Callback.cpp:1.3
--- llvm/tools/jello/Callback.cpp:1.2 Thu Dec 5 21:52:51 2002
+++ llvm/tools/jello/Callback.cpp Fri Dec 13 07:15:36 2002
@@ -6,6 +6,7 @@
//===----------------------------------------------------------------------===//
#include "VM.h"
+#include "Support/Statistic.h"
#include <signal.h>
#include <ucontext.h>
#include <iostream>
@@ -26,10 +27,10 @@
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: llvm/tools/jello/Emitter.cpp
diff -u llvm/tools/jello/Emitter.cpp:1.4 llvm/tools/jello/Emitter.cpp:1.5
--- llvm/tools/jello/Emitter.cpp:1.4 Thu Dec 12 23:40:28 2002
+++ llvm/tools/jello/Emitter.cpp Fri Dec 13 07:15:36 2002
@@ -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 @@
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: llvm/tools/jello/GlobalVars.cpp
diff -u llvm/tools/jello/GlobalVars.cpp:1.2 llvm/tools/jello/GlobalVars.cpp:1.3
--- llvm/tools/jello/GlobalVars.cpp:1.2 Thu Dec 12 09:33:40 2002
+++ llvm/tools/jello/GlobalVars.cpp Fri Dec 13 07:15:36 2002
@@ -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 @@
// 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!");
}
More information about the llvm-commits
mailing list