summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-10-10 18:07:10 +0000
committerMon P Wang <wangmp@apple.com>2008-10-10 18:07:10 +0000
commit297364cd3bb9b24bffe928307b82dd654f21341f (patch)
treec676538e3aa9ee40bfee34e768371603a0aef31d /llvm/lib
parent796bc4e6ce3066bd67b7da55b7056fc11eec36f3 (diff)
downloadbcm5719-llvm-297364cd3bb9b24bffe928307b82dd654f21341f.tar.gz
bcm5719-llvm-297364cd3bb9b24bffe928307b82dd654f21341f.zip
Revert r57340 move guard mutex in getPointerToFunction as this can cause
deadlock issues with java llvm-svn: 57356
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 413308c3df8..f57de179c50 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -489,8 +489,6 @@ void *JIT::getPointerToFunction(Function *F) {
if (void *Addr = getPointerToGlobalIfAvailable(F))
return Addr; // Check if function already code gen'd
- MutexGuard locked(lock);
-
// Make sure we read in the function if it exists in this Module.
if (F->hasNotBeenReadFromBitcode()) {
// Determine the module provider this function is provided by.
@@ -516,6 +514,8 @@ void *JIT::getPointerToFunction(Function *F) {
return Addr;
}
+ MutexGuard locked(lock);
+
if (F->isDeclaration()) {
void *Addr = getPointerToNamedFunction(F->getName());
addGlobalMapping(F, Addr);
OpenPOWER on IntegriCloud