[LLVMdev] C API for hooking MCJIT's resolving of out-of-module references?

Per Mildner Per.Mildner at sics.se
Fri Apr 24 03:17:38 PDT 2015


I am trying to port the Kaleidoscope tutorials to use the C API.

This worked up to part 3, but the code for part 4 (where MCJIT support is added), creates a custom memory manager, in C++, that is then added with setMCJITMemoryManager().

The custom memory manager is used in order to resolve references from a module to symbols outside the module, e.g. to symbols representing code jitted in other modules.

So, how can I hook the way MCJIT resolves out-of-module references, using only the C API? Alternatively, is there some other way to handle cross module references?

I briefly looked at the WebKit FTL code. They (mostly) use the C API but I could not see how symbol references were handled.

(I use the C API because the surrounding application is written in C, so adding my own C wrappers for unexposed functionality is not an attractive option.)

Thanks in advance,


Per Mildner
Per.Mildner at sics.se







More information about the llvm-dev mailing list