Emmanuel Roche via llvm-dev
2020-Apr-27 10:33 UTC
[llvm-dev] C++ JIT Compiler with LLVM on Windows 10 - part 5
Hello LLVM developers! So, I'm continuing my journey with my toy C++ JIT compiler implementation, and I wrote another article on the issues/solutions I've been working on in the past few days, mainly: - Precompiled header handling, - Emulated TLS desactivation, - Globals construction & destruction, - C++ exceptions handling, - Multi modules linking, => In case this could be helpful to anyone, you will find this article here: http://wiki.nervtech.org/doku.php?id=blog:2020:0425_jit_compiler_part5_improvements And of course, if you have any questions for me, just let me know. Meanwhile, happy hacking everyone ;-)! Best regards, Manu. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200427/1c00b4da/attachment.html>
David Blaikie via llvm-dev
2020-Apr-27 18:11 UTC
[llvm-dev] C++ JIT Compiler with LLVM on Windows 10 - part 5
+Lang for LLVM Orc things On Mon, Apr 27, 2020 at 3:34 AM Emmanuel Roche via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello LLVM developers! > > So, I'm continuing my journey with my toy C++ JIT compiler implementation, > and I wrote another article on the issues/solutions I've been working on in > the past few days, mainly: > > - Precompiled header handling, > - Emulated TLS desactivation, > - Globals construction & destruction, > - C++ exceptions handling, > - Multi modules linking, > > => In case this could be helpful to anyone, you will find this article > here: > http://wiki.nervtech.org/doku.php?id=blog:2020:0425_jit_compiler_part5_improvements > > And of course, if you have any questions for me, just let me know. > > Meanwhile, happy hacking everyone ;-)! > > Best regards, > Manu. > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200427/50758c54/attachment.html>
Lang Hames via llvm-dev
2020-Apr-27 18:41 UTC
[llvm-dev] C++ JIT Compiler with LLVM on Windows 10 - part 5
I was just reading the blog post -- very cool! Regarding Globals construction & destruction: There definitely has been a lot of churn in that area. There will probably be more before LLVM 11 is released, but I can see light at the end of the tunnel. I think the Right Way to run initializers in a JITDylib is to treat it as equivalent to a dlopen operation (with extra allowances for the fact that new initializers can be added to a JITDylib at runtime). This is what the LLJIT::initialize method is doing. Now we just need to generalize it to support out-of-process JITs. That will at least require a new remote-target abstraction, and an RPC implementation for testing in-tree. Regarding emulated TLS deactivation: I've never looking into how/whether this works on Windows. If it doesn't make sense to have it on by default there we can change the default for Windows targets. Regarding merging of multiple modules: "But of course this would not work because as soon as I try to load the second script, I get a duplicate symbol error from LLVM (and this completely makes sense): [ERROR]: LLVM error: Duplicate definition of symbol '??_7success at lest@@6B@'" I think that anything that llvm-link can merge should, in theory, be safe to add to the JIT. This actually sounds like a bug. Are you able to share the full modules that you were merging? Regards, Lang. On Mon, Apr 27, 2020 at 11:11 AM David Blaikie <dblaikie at gmail.com> wrote:> +Lang for LLVM Orc things > > On Mon, Apr 27, 2020 at 3:34 AM Emmanuel Roche via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello LLVM developers! >> >> So, I'm continuing my journey with my toy C++ JIT compiler >> implementation, and I wrote another article on the issues/solutions I've >> been working on in the past few days, mainly: >> >> - Precompiled header handling, >> - Emulated TLS desactivation, >> - Globals construction & destruction, >> - C++ exceptions handling, >> - Multi modules linking, >> >> => In case this could be helpful to anyone, you will find this article >> here: >> http://wiki.nervtech.org/doku.php?id=blog:2020:0425_jit_compiler_part5_improvements >> >> And of course, if you have any questions for me, just let me know. >> >> Meanwhile, happy hacking everyone ;-)! >> >> Best regards, >> Manu. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200427/fb32d60a/attachment.html>