Hi All,
As discussed in RFC - LLVM JIT Office Hours / Updates I’m going to try holding regular LLVM JIT office hours starting this month. The first session this month will be held on Monday September 26th 2022, from 8AM to 9AM PDT. I will post a zoom link in the thread below. If you have questions or comments about ORC, or just want to chat about the project, please come along!
I also want to mention some of the updates to the APIs since the last ORC JIT Weekly email. We can’t cover everything that’s happened since then, but I’d like to mention a few highlights:
Windows Support
GSoC student Sunho Kim has written JITLink and ORC runtime support for the COFF object format, including a COFF LinkGraph builder and COFF/x86-64 backend. This is a huge leap forward for Windows support in ORC – Windows users will now be able to use native COFF objects, rather than running under MinGW or ELF-win32 triples. There are still a handful of APIs that need to be updated before we can switch to JITLink for COFF by default, but we expect to be able to make that switch in the next month or so.
In addition to enabling Windows support on x86-64, Sunho’s COFFLinkGraphBuilder should make it easy to extend Windows support to new architectures by adding further COFF backends.
ELF/aarch64 Support
Sunho has also written an ELF/aarch64 backend, extending Linux support to AArch64 and including support for TLSDESC thread locals.
Slab Allocation and Shared Memory
GSoC student Anubhab Ghosh has written a new JITLinkMemoryManager implementation, the MapperJITLinkMemoryManager, that supports slab reservation and pluggable mappers to perform the actual memory allocation (like a much-improved version of MCJIT’s SectionMemoryManager). By reserving slabs up front Anubhab’s allocator can guarantee that range constraints for small code model are satisfied, allowing clients to load arbitrary small code model code safely under ORC. Anubhab’s implementation includes built-in support for in-process memory allocation, cross-process allocation via EPC calls, and cross-process allocation using POSIX and Win32 shared memory.
The MapperJITLinkMemoryManager class is a big step forward for memory allocation in ORC, making it both safer and easier for clients to deal with range constraints and out-of-process allocation. The llvm-jitlink
tool has already been updated to use it, and once we have gotten some more experience with this allocator in-tree I expect it to replace InProcessJITLinkMemoryManager as the default allocator for ORC.
OrcTargetProcess is moving to the ORC runtime
OrcTargetProcess is an LLVM library containing executor-side functionality required for ORC (as opposed to the ORC library itself, which lives in the controller process). In PR56603 I have proposed that we move OrcTargetProcess’s functionality into the ORC runtime. The first steps in this direction are being taken now.
Beyond these major updates work continues on regular bug fixes and features. Themes for the LLVM 16 cycle will probably be (1) Refactoring OrcTargetProcess (see above), (2) moving to JITLink by default on more platforms, (3) fixing some low-hanging performance bugs.
And since work is very actively continuing, I hope you’ll jump in with bug reports and patches if you have them.
Happy JITing everyone!
– Lang.