aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-02 00:09:00 +0000
committerChris Lattner <sabre@nondot.org>2003-06-02 00:09:00 +0000
commitd5af63f325b01f31a06d1b1b31df9bbc5fe64926 (patch)
treee4415281a9a5fb5f10aa7bdc15db3049978adc56 /lib/ExecutionEngine
parentbba1b6df9a7ac36e3a479dfe953a9618c87db7bb (diff)
downloadexternal_llvm-d5af63f325b01f31a06d1b1b31df9bbc5fe64926.zip
external_llvm-d5af63f325b01f31a06d1b1b31df9bbc5fe64926.tar.gz
external_llvm-d5af63f325b01f31a06d1b1b31df9bbc5fe64926.tar.bz2
Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp51
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 215e9eb..4138e75 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -160,54 +160,3 @@ uint64_t Emitter::forceCompilationOf(Function *F) {
return (intptr_t)TheVM->getPointerToFunction(F);
}
-#if 0
-
-
-// emitPCRelativeDisp - For functions, just output a displacement that will
-// cause a reference to the zero page, which will cause a seg-fault, causing
-// things to get resolved on demand. Keep track of these markers.
-//
-// For basic block references, keep track of where the references are so they
-// may be patched up when the basic block is defined.
-//
-void Emitter::emitPCRelativeDisp(Value *V) {
- BasicBlock *BB = cast<BasicBlock>(V); // Keep track of reference...
- BBRefs.push_back(std::make_pair(BB, (unsigned*)CurByte));
- CurByte += 4;
-}
-
-// emitAddress - Emit an address in either direct or PCRelative form...
-//
-void Emitter::emitAddress(void *Addr, bool isPCRelative) {
- if (isPCRelative) {
- *(intptr_t*)CurByte = (intptr_t)Addr - (intptr_t)CurByte-4;
- } else {
- *(void**)CurByte = Addr;
- }
- CurByte += 4;
-}
-
-void Emitter::emitGlobalAddress(GlobalValue *V, bool isPCRelative) {
- if (isPCRelative) { // must be a call, this is a major hack!
- // Try looking up the function to see if it is already compiled!
- if (void *Addr = TheVM->getPointerToGlobalIfAvailable(V)) {
- emitAddress(Addr, isPCRelative);
- } else { // Function has not yet been code generated!
- TheVM->addFunctionRef(CurByte, cast<Function>(V));
-
- // Delayed resolution...
- emitAddress((void*)VM::CompilationCallback, isPCRelative);
- }
- } else {
- emitAddress(TheVM->getPointerToGlobal(V), isPCRelative);
- }
-}
-
-void Emitter::emitFunctionConstantValueAddress(unsigned ConstantNum,
- int Offset) {
- assert(ConstantNum < ConstantPoolAddresses.size() &&
- "Invalid ConstantPoolIndex!");
- *(void**)CurByte = (char*)ConstantPoolAddresses[ConstantNum]+Offset;
- CurByte += 4;
-}
-#endif