diff options
author | Jim Grosbach <grosbach@apple.com> | 2008-10-30 23:44:39 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2008-10-30 23:44:39 +0000 |
commit | 2589604d85574b8d053b68c64fb258fcba92b4e8 (patch) | |
tree | 967eaf0e3e2a4457b8324ed9e04b007bc07b7e26 | |
parent | c696ef9b11710e9a16daece2198a2b65d011d52d (diff) | |
download | bcm5719-llvm-2589604d85574b8d053b68c64fb258fcba92b4e8.tar.gz bcm5719-llvm-2589604d85574b8d053b68c64fb258fcba92b4e8.zip |
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
llvm-svn: 58475
-rw-r--r-- | llvm/include/llvm/Target/TargetJITInfo.h | 3 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/Target/TargetJITInfo.h b/llvm/include/llvm/Target/TargetJITInfo.h index 142f0efbd3f..09ef15eb49f 100644 --- a/llvm/include/llvm/Target/TargetJITInfo.h +++ b/llvm/include/llvm/Target/TargetJITInfo.h @@ -107,6 +107,9 @@ namespace llvm { // JIT to manage a GOT for it. bool needsGOT() const { return useGOT; } + /// hasCustomConstantPool - Allows a target to specify that constant + /// pool address resolution is handled by the target. + virtual bool hasCustomConstantPool() const { return false; } protected: bool useGOT; }; diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 73346fe99e5..9f020e3ae37 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -1013,6 +1013,11 @@ void* JITEmitter::allocateSpace(intptr_t Size, unsigned Alignment) { } void JITEmitter::emitConstantPool(MachineConstantPool *MCP) { + if (TheJIT->getJITInfo().hasCustomConstantPool()) { + DOUT << "JIT: Target has custom constant pool handling. Omitting standard " + "constant pool\n"; + return; + } const std::vector<MachineConstantPoolEntry> &Constants = MCP->getConstants(); if (Constants.empty()) return; |