-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support TLS #44
Comments
Hi Luis, great to hear you're having some success with D and LLVM. The performance issue is due to a temporary regression in stack frame handling (stack frames are always created) which I hope to come back and resolve shortly. TLS is a high priority for me too, as it's obviously vital for running "real" programs. I'll be posting a larger status update on the mailing lists on Monday, but to just give a quick overview of my approach.
We're currently well in to 2), and I expect we'll move on to 3) in the course of next week. Many thanks for kicking the tires, I'm looking forwards to usable RISC-V D support via LLVM (did anyone demonstrate D for RISC-V via GDC already?). |
Back in the time I was using the riscv/riscv-llvm repo, I managed to compile GDC with the RISC-V GCC backend, but I was disappointed with the results. With the old LLVM backend I wasn't generating machine code directly, because the compiler complained that wasn't supported (although that might have been my fault, the same happened with this new backend when I used I tried a few days ago to checkout again GDC, but I didn't manage to compile it with the RISC-V GCC backend (on macOS), so I don't know how it currently compares. I think the conclusion is that the whole program optimizations mattered more than the peephole ones. Probably a cascade of optimizations due to better inlining... I'm really looking forward to TLS. Even basic TLS support would allow me to start porting the D runtime and standard libraries. I might even stream that effort! |
BTW, FWIW nothing broke for me with the latest changes (75c94b1), even when using RV32IM. |
@asb Any progress towards TLS support? |
I've migrated a D codebase from the riscv/riscv-llvm -based compiler to the lowRISC/riscv-llvm one. After the latest lowRISC/riscv-llvm changes I was able to remove essentially all workarounds for invalid code (although the latest changes (because of the new branch analysis?) seemed to cause a 4X performance penalty, despite allowing more modules to compile without -O0).
The only major issue remaining for great D support in this LLVM backend is the lack of thread-local storage. Since D globals default to TLS, that lack is particularly felt. I'm opening this issue to communicate the relative importance of adding TLS. Please address that when possible.
The text was updated successfully, but these errors were encountered: