[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Emitter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 22 13:48:45 PST 2004



Changes in directory llvm/lib/ExecutionEngine/JIT:

Emitter.cpp updated: 1.53 -> 1.54
---
Log message:

These methods are obsolete


---
Diffs of the changes:  (+1 -21)

Index: llvm/lib/ExecutionEngine/JIT/Emitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.53 llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.54
--- llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.53	Mon Nov 22 01:24:43 2004
+++ llvm/lib/ExecutionEngine/JIT/Emitter.cpp	Mon Nov 22 15:48:33 2004
@@ -169,7 +169,7 @@
   }
 
   DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for function '"
-                  << F->getName() << "\n");
+                  << F->getName() << "'\n");
 
   // Finally, keep track of the stub-to-Function mapping so that the
   // JITCompilerFn knows which function to compile!
@@ -250,8 +250,6 @@
 
     virtual uint64_t getCurrentPCValue();
     virtual uint64_t getCurrentPCOffset();
-    virtual uint64_t getGlobalValueAddress(GlobalValue *V);
-    virtual uint64_t getGlobalValueAddress(const char *Name);
     virtual uint64_t getConstantPoolEntryAddress(unsigned Entry);
 
     // forceCompilationOf - Force the compilation of the specified function, and
@@ -398,24 +396,6 @@
   *Ptr = W;
 }
 
-uint64_t Emitter::getGlobalValueAddress(GlobalValue *V) {
-  // Try looking up the function to see if it is already compiled, if not return
-  // 0.
-  if (Function *F = dyn_cast<Function>(V)) {
-    void *Addr = TheJIT->getPointerToGlobalIfAvailable(F);
-    if (Addr == 0 && F->hasExternalLinkage()) {
-      // Do not output stubs for external functions.
-      Addr = TheJIT->getPointerToFunction(F);
-    }
-    return (intptr_t)Addr;
-  } else {
-    return (intptr_t)TheJIT->getOrEmitGlobalVariable(cast<GlobalVariable>(V));
-  }
-}
-uint64_t Emitter::getGlobalValueAddress(const char *Name) {
-  return (intptr_t)TheJIT->getPointerToNamedFunction(Name);
-}
-
 // getConstantPoolEntryAddress - Return the address of the 'ConstantNum' entry
 // in the constant pool that was last emitted with the 'emitConstantPool'
 // method.






More information about the llvm-commits mailing list