ORC JIT Weekly #4

Hi All,

The initializer patch still hasn’t landed, but there’s an early preview up at https://reviews.llvm.org/D74300 (thanks to Stefan for the suggestion). Regression tests pass on Darwin, but unit tests and examples have not been updated yet.

You can find a description of the patch on the review site, and I imagine there will be plenty to discuss in it, but the headline change for most of you will be updated LLJIT interface: The runConstructors and runDestructors methods have been removed, and replaced with:

Error initialize(JITDylib &JD)

Error deinitialize(JITDylib &JD)

The exact behavior of these methods will depend on which LLJIT::PlatformSupport class you set, but they’re intended to behave like dlopen / dlclose: They run the static constructors / destructors for all modules added to the given JITDylib, and any JITDylibs that the given JITDylib (transitively) links against.

You can check out the changes to lli.cpp to see a basic usage example, and I intend to add another example to llvm/examples/LLJITExamples soon (either before this lands, or shortly after).