diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-04-12 00:22:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-04-12 00:22:01 +0000 |
commit | 213ea6b27665935c2b170cf561e58f57b9ae7be7 (patch) | |
tree | 3f7683c2cf66eb32c760cc565b0968298dc3f72f /llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | 4572b4557460c7459aee87dc631f5ed267a15dde (diff) | |
download | bcm5719-llvm-213ea6b27665935c2b170cf561e58f57b9ae7be7.tar.gz bcm5719-llvm-213ea6b27665935c2b170cf561e58f57b9ae7be7.zip |
Add debugging code.
llvm-svn: 49566
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index c43d4d60b11..2277897d3e4 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -233,8 +233,7 @@ unsigned JITResolver::getGOTIndexForAddr(void* addr) { if (!idx) { idx = ++nextGOTIndex; revGOTMap[addr] = idx; - DOUT << "Adding GOT entry " << idx - << " for addr " << addr << "\n"; + DOUT << "Adding GOT entry " << idx << " for addr " << addr << "\n"; } return idx; } @@ -746,11 +745,15 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) { ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType(); Size += TheJIT->getTargetData()->getABITypeSize(Ty); - ConstantPoolBase = allocateSpace(Size, 1 << MCP->getConstantPoolAlignment()); + unsigned Align = 1 << MCP->getConstantPoolAlignment(); + ConstantPoolBase = allocateSpace(Size, Align); ConstantPool = MCP; if (ConstantPoolBase == 0) return; // Buffer overflow. + DOUT << "JIT: Emitted constant pool at [" << ConstantPoolBase + << "] (size: " << Size << ", alignment: " << Align << ")\n"; + // Initialize the memory for all of the constant pool entries. for (unsigned i = 0, e = Constants.size(); i != e; ++i) { void *CAddr = (char*)ConstantPoolBase+Constants[i].Offset; @@ -761,6 +764,7 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) { abort(); } TheJIT->InitializeMemory(Constants[i].Val.ConstVal, CAddr); + DOUT << "JIT: CP" << i << " at [" << CAddr << "]\n"; } } |