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:
Nekotekina
2018-07-21 12:08:55 +03:00
parent beb8130d42
commit 71ca0f4f29

View File

@@ -390,16 +390,12 @@ JITSymbol MCJIT::findSymbol(const std::string &Name,
uint64_t MCJIT::getGlobalValueAddress(const std::string &Name) {
MutexGuard locked(lock);
uint64_t Result = getSymbolAddress(Name, false);
if (Result != 0)
finalizeLoadedModules();
return Result;
}
uint64_t MCJIT::getFunctionAddress(const std::string &Name) {
MutexGuard locked(lock);
uint64_t Result = getSymbolAddress(Name, true);
if (Result != 0)
finalizeLoadedModules();
return Result;
}