mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 05:00:26 +00:00
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
This commit is contained in:
parent
7a76ed6774
commit
77fcca845e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user