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 | 8fe95356dd487a79145ec07a9f46cd743b4c9bdd (patch) | |
tree | 2f0590c5312d4192211ed0512ba65c543ddd86f4 | |
parent | e53a5af96652567847508a3131863a9a186ada9b (diff) | |
download | external_llvm-8fe95356dd487a79145ec07a9f46cd743b4c9bdd.zip external_llvm-8fe95356dd487a79145ec07a9f46cd743b4c9bdd.tar.gz external_llvm-8fe95356dd487a79145ec07a9f46cd743b4c9bdd.tar.bz2 |
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58475 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetJITInfo.h | 3 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h index 142f0ef..09ef15e 100644 --- a/include/llvm/Target/TargetJITInfo.h +++ b/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/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 73346fe..9f020e3 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/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; |