Skip to content

Commit b860b5e

Browse files
committed
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.
1 parent 40a92ac commit b860b5e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/ExecutionEngine/MCJIT/MCJIT.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -390,16 +390,12 @@ JITSymbol MCJIT::findSymbol(const std::string &Name,
390390
uint64_t MCJIT::getGlobalValueAddress(const std::string &Name) {
391391
MutexGuard locked(lock);
392392
uint64_t Result = getSymbolAddress(Name, false);
393-
if (Result != 0)
394-
finalizeLoadedModules();
395393
return Result;
396394
}
397395

398396
uint64_t MCJIT::getFunctionAddress(const std::string &Name) {
399397
MutexGuard locked(lock);
400398
uint64_t Result = getSymbolAddress(Name, true);
401-
if (Result != 0)
402-
finalizeLoadedModules();
403399
return Result;
404400
}
405401

0 commit comments

Comments
 (0)