mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
MCJIT: don't finalize modules on symbol lookup (workaround)
This is extremely slow yet unnecessary with manual finalization. In LLVM 6 this wasn't a problem.
This commit is contained in:
parent
d18817ded9
commit
6516f565ed
@ -396,16 +396,12 @@ JITSymbol MCJIT::findSymbol(const std::string &Name,
|
|||||||
uint64_t MCJIT::getGlobalValueAddress(const std::string &Name) {
|
uint64_t MCJIT::getGlobalValueAddress(const std::string &Name) {
|
||||||
std::lock_guard<sys::Mutex> locked(lock);
|
std::lock_guard<sys::Mutex> locked(lock);
|
||||||
uint64_t Result = getSymbolAddress(Name, false);
|
uint64_t Result = getSymbolAddress(Name, false);
|
||||||
if (Result != 0)
|
|
||||||
finalizeLoadedModules();
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t MCJIT::getFunctionAddress(const std::string &Name) {
|
uint64_t MCJIT::getFunctionAddress(const std::string &Name) {
|
||||||
std::lock_guard<sys::Mutex> locked(lock);
|
std::lock_guard<sys::Mutex> locked(lock);
|
||||||
uint64_t Result = getSymbolAddress(Name, true);
|
uint64_t Result = getSymbolAddress(Name, true);
|
||||||
if (Result != 0)
|
|
||||||
finalizeLoadedModules();
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user