[llvm-dev] MCJIT, can't use with math functions

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 22 13:43:17 PDT 2019


Hi,

for my application (uses Builder and MCJIT) I am making the transition 
LLVM 6.0 -> 8.0.

It runs fine for self-contained functions, but whenever a jit-ed 
function contains calls to the math library (e.g. @cosf) it seems to 
have problems getting the address after successfully finding the symbol:

Failure value returned from cantFail wrapped call
UNREACHABLE executed at 
~/toolchain/install/llvm-8.0-x86-debug/include/llvm/Support/Error.h:732!

if (auto Sym = CompileLayer.findSymbol(MangledNameStream.str(),true))
     {
       void* fptr = (void *)cantFail(Sym.getAddress());

The last statement fails with the above message.


Has anything related to using MCJIT with math library functions changed 
since LLVM 6.0?


Best,

Frank






More information about the llvm-dev mailing list