[llvm-commits] [llvm] r58475 - in /llvm/trunk: include/llvm/Target/TargetJITInfo.h lib/ExecutionEngine/JIT/JITEmitter.cpp

Jim Grosbach grosbach at apple.com
Thu Oct 30 16:44:39 PDT 2008


Author: grosbach
Date: Thu Oct 30 18:44:39 2008
New Revision: 58475

URL: http://llvm.org/viewvc/llvm-project?rev=58475&view=rev
Log:
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.

Modified:
    llvm/trunk/include/llvm/Target/TargetJITInfo.h
    llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp

Modified: llvm/trunk/include/llvm/Target/TargetJITInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetJITInfo.h?rev=58475&r1=58474&r2=58475&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetJITInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetJITInfo.h Thu Oct 30 18:44:39 2008
@@ -107,6 +107,9 @@
     // 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;
   };

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=58475&r1=58474&r2=58475&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Oct 30 18:44:39 2008
@@ -1013,6 +1013,11 @@
 }
 
 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;
 





More information about the llvm-commits mailing list