From 6516f565edef7e633f256d2a475bf19176b983b4 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 21 Jul 2018 12:08:55 +0300 Subject: [PATCH] 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. --- lib/ExecutionEngine/MCJIT/MCJIT.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 144329aa8be..a0ac1b2f7f6 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -396,16 +396,12 @@ JITSymbol MCJIT::findSymbol(const std::string &Name, uint64_t MCJIT::getGlobalValueAddress(const std::string &Name) { std::lock_guard locked(lock); uint64_t Result = getSymbolAddress(Name, false); - if (Result != 0) - finalizeLoadedModules(); return Result; } uint64_t MCJIT::getFunctionAddress(const std::string &Name) { std::lock_guard locked(lock); uint64_t Result = getSymbolAddress(Name, true); - if (Result != 0) - finalizeLoadedModules(); return Result; }