[PATCH][llvm-c] Expose MC JIT
Filip Pizlo
fpizlo at apple.com
Fri Apr 12 16:26:00 PDT 2013
Included are two patches that expose MCJIT via the C API:
The first patch makes the MCJIT use the default JITMemoryManager if no memory manager is provided. This simplifies integration with the C API, which does not already expose a mechanism for supplying a custom memory manager.
The second patch exposes the MCJIT via the C API, and also exposes the NoFramePointerElim option. The manner in which options are exposed is designed for forward compatibility; you supply an options struct along with a size which you zero-fill prior to manipulating. This is similar to the idiom I've seen used in other C APIs like BerkeleyDB. I considered having separate C function calls for each option, in the style of the ExecutionEngineBuilder API - but while that idiom feels right to me in C++, it feels less C-like. As well, the current options approach exposes not just parts of the Builder but also part of TargetOptions (namely, NoFramePointerElim). It's also more concise in practice.
I plan to expose more innards through the LLVMMCJITCompilerOptions in the future. I'd be happy to do more of that in one go if that was preferred; but I thought that a baby step would be the best thing for now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcjit-default-allocator.patch
Type: application/octet-stream
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130412/70ae506e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcjit-llvm-c.patch
Type: application/octet-stream
Size: 3919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130412/70ae506e/attachment-0001.obj>
-------------- next part --------------
-Filip
More information about the llvm-commits
mailing list