diff options
author | Mon P Wang <wangmp@apple.com> | 2008-10-10 18:07:10 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2008-10-10 18:07:10 +0000 |
commit | 77fcca845e84304c1949c979ba539d2329e87f38 (patch) | |
tree | f7de7ebd09bf6d975ba1235f3f5ba3f9e864f07a /lib/ExecutionEngine | |
parent | 7a76ed67745a054eaca11daaddb41fc3be90286c (diff) | |
download | external_llvm-77fcca845e84304c1949c979ba539d2329e87f38.zip external_llvm-77fcca845e84304c1949c979ba539d2329e87f38.tar.gz external_llvm-77fcca845e84304c1949c979ba539d2329e87f38.tar.bz2 |
Revert r57340 move guard mutex in getPointerToFunction as this can cause
deadlock issues with java
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 413308c..f57de17 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/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); |