[llvm-dev] ORC JIT fails with standard math librrary
Lang Hames via llvm-dev
llvm-dev at lists.llvm.org
Mon May 6 18:56:27 PDT 2019
I see the problem: The KaleidoscopeJIT in this example isn't searching
process symbols. This leads to a "symbol not found" failure when we try to
look up math functions, but due to the way legacy ORC lookup works this
manifests as a "failure to materialize symbols" error when we try to
materialize a function that uses these symbols, rather than a plain "symbol
not found" error.
I should be able to fix this up tomorrow, and the issue will go away
entirely once the tutorials are moved on to concurrent ORC.
On Tue, Mar 26, 2019 at 1:37 PM Frank Winter via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I still can't get IR functions to JIT compile with the ORC JIT when they
> contain a call to the standard math library. Attached is a minimal exploit.
> The program uses the KaleidoscopeJIT.h that ships with LLVM 8 (except
> that I had to expose the Datalayout). It reads from the filesystem an IR
> file (filename "func_works.ll" or "func_cos_fails.ll) and asks the ORC
> JIT first for the symbol "func_ir" and then for the address.
> In case the file "func_works.ll" was read the program succeeds with:
> symbol found!
> address found!
> In case the file "func_cos_fails.ll" was read the program fails with:
> symbol found!
> Failure value returned from cantFail wrapped call
> UNREACHABLE executed at
> Stack dump:
> This was tested on an x86 Linux Ubuntu system.
> Does anyone see what's going on or is it time to file a bug report?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev