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
This commit is contained in:
Jim Grosbach 2008-10-30 23:44:39 +00:00
parent e53a5af966
commit 8fe95356dd
2 changed files with 8 additions and 0 deletions

View File

@ -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;
};

View File

@ -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;