-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime/jit-rt: revive and migrates the whole thing to OrcJIT v2 #4774
Conversation
Hehe, looks like one's motivated, nice! - In case you haven't seem them, there are quite a few lit-tests for this feature: https://github.com/ldc-developers/ldc/tree/master/tests/dynamiccompile. No idea if anything can still be salvaged from #3184, Ivan's WIP from 5 (!) years ago by now. |
I see. I did not know there was another pull request doing the same thing from 5 years ago. Now that I see they made very similar changes before, I realize I duplicated a fair amount of changes (but this seems like a form of cross-validation? Two independent implementations look very similar). |
Now, 100% of those LIT tests are passing (with LLVM 18). |
2c90767
to
bd2c4b5
Compare
Very nice progress! - I've pushed 2 commits to reduce the remaining failures on aarch64. |
465a543
to
8cbe0d1
Compare
In my Windows VM, the tests don't hang as they do for CI (with a pushed Win32 fix wrt.
Looks like there's some trouble with the Edit: We do use |
I have tried to debug this problem on a Windows 11 installation with Visual Studio 2022 (Community Edition). |
60fedcc
to
36bd753
Compare
On Ubuntu 20.04 aarch64:
But it's still broken on macOS aarch64 unfortunately |
It seems like I may have discovered several bugs in LLVM that are exclusive to Windows. I have currently worked around them because I am not entirely sure if they are "bugs" or "intended behaviors". |
b0606f7
to
045bf6a
Compare
3a0b32b
to
236a8d9
Compare
3f8bcdf
to
b32bb4d
Compare
... the current JIT linker
... JITLink does not work very well for the code patterns generated by LDC
tests/dynamiccompile/throw.d: also limit the XFAIL directive to macOS ARM64 platform
... so that build will not fail if the path to the D compiler contains whitespaces
The CI failures are due to network issues; a retry should fix them. |
(restarted) |
Thanks! All CI tests passed now |
Did you resolve #4774 (comment) ? |
I've pushed a commit merging the two very similar |
Thanks! Hopefully, by switching to the more stable easy LLJIT API, we can last longer before another need for refactoring comes. |
Anything else to be done here? |
This pull request migrates the dynamic compile system to LLVM OrcJIT v2 (the newer "v2" version from post-LLVM 16 with opaque pointers, not the older "v2" version from the LLVM 12 ~ 15 era).
The implementation is currently in very rough shape, and I am not entirely sure what I am doing. However, the "Hello World" example in the documentation has started to work now.