<div dir="ltr">Hi Lang,<div><br></div><div>I read each of your ORC JIT Weekly updates with great interest!</div><div><br></div><div>I have a question that I thought other ORC JIT users might be interested in...</div><div><br></div><div>As I mentioned in the LLVM Discord server - I have this "fast loading object-file" scheme where rather than linking and then loading dynamic libraries into my system, I load object files and add them to the ORC JIT one at a time. This scheme works and it lets me avoid calling out to the linker and it gives me some new capabilities that I'm really excited about. The time to link the object files at runtime is negligible. </div><div><br></div><div>Recall that I initially ran into a problem with the "small" code model on macOS where the JIT was linking to call library functions that were too far away to fit into a 32-bit word leading to segfaults. You recommended compiling that code with the 'large' code model. I did that in a big way and it works - but it's impacted performance quite a lot - everything slows down by at least 1.5x. You said you are working on a solution with the new JITLink to have the linker add jump tables in these situations. Have I characterized this all correctly? <br></div><div><br></div><div>Question: When do you think this might be available for use in llvm-tot? I'm asking because I can rearrange things to adopt a hybrid solution in the meantime if it's going to be months.</div><div><br></div><div>Cheers,</div><div><br></div><div>.Chris.</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 16, 2020 at 6:44 PM Lang Hames <<a href="mailto:lhames@gmail.com">lhames@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>The initializer patch review at <a href="https://reviews.llvm.org/D74300" target="_blank">https://reviews.llvm.org/D74300</a> has been updated. The new version contains a MachOPlatform implementation that demonstrates how Platforms and ObjectLinkingLayer::Plugins can work together to implement platform specific initialization. In this case, the MachOPlatform installs a plugin that scans objects for __objc_classlist and __objc_selref sections and uses them to register JIT'd code with the Objective-C runtime. This allows LLJIT instances (and the lli command line tool) to run IR compiled from Objective-C and Swift sources.</div><div><br></div><div>Discussion on the review is ongoing (thanks especially to Stefan Granitz for his review comments!) but I will aim to have the patch tidied up and landed in the coming week.</div><div><br></div><div>-- Lang.</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="font-size:small">Christian Schafmeister</div><div style="font-size:small">Professor, Chemistry Department</div><div style="font-size:small">Temple University</div></div></div>