I have a few questions about the new ORC JIT.
I saw Lang Hames (hi!) excellent talk at the llvm-dev meeting a few weeks ago. The ORC JIT is undergoing some API changes and I’d like/need to take advantage of them.
(1) How do I take ownership of the ObjectFile once the ORC JIT has created it?
I’d like to take ownership of object files generated by the ORC JIT so that I can save them to disk and in later sessions reload them.
(2) How would I pass an ObjectFile saved in question#1 back to ORC so that it will relocate it and generate function pointers?
(3) How do I get access to the relocated ObjectFile sections?
Currently I subclass SectionMemoryManager and implement allocateDataSection(…)
I can get the memory for the “__llvm_stackmaps” section - but I don’t know when/if the contents have been fully set up with relocated function pointers.
(4) For the “__llvm_stackmaps” section - will I need to do any relocation to obtain the function pointers?
Background:
I’m using llvm.experimental.stackmaps to register one variable in each stack frame that contains spilled register arguments.
I’ve figured out how to get access to the stackmaps for code that I load into my system from dynamic libraries that our compiler generates.
The answers to questions above will help me get access to the stackmaps from ORC JITted code.