summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-08 21:34:11 +0000
committerChris Lattner <sabre@nondot.org>2003-05-08 21:34:11 +0000
commitd340dbdb5d430a2f33630720e67fe97903b60001 (patch)
tree07c56d7335a9e70959eefa86265cdb8ff075d8eb /llvm/lib/ExecutionEngine/JIT/Emitter.cpp
parent974e1d8ec24cb12fc3e2a0cf8bfd192d89e1b5e6 (diff)
downloadbcm5719-llvm-d340dbdb5d430a2f33630720e67fe97903b60001.tar.gz
bcm5719-llvm-d340dbdb5d430a2f33630720e67fe97903b60001.zip
Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code llvm-svn: 6051
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/Emitter.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/Emitter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
index 1c89bdba26b..d6f75c08f76 100644
--- a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
@@ -131,8 +131,11 @@ void Emitter::emitAddress(void *Addr, bool isPCRelative) {
void Emitter::emitGlobalAddress(GlobalValue *V, bool isPCRelative) {
if (isPCRelative) { // must be a call, this is a major hack!
+ // FIXME: Try looking up the function to see if it is already compiled!
TheVM.addFunctionRef(CurByte, cast<Function>(V));
- emitAddress(0, isPCRelative); // Delayed resolution...
+
+ // Delayed resolution...
+ emitAddress((void*)VM::CompilationCallback, isPCRelative);
} else {
emitAddress(TheVM.getPointerToGlobal(V), isPCRelative);
}
OpenPOWER on IntegriCloud