News for hackers. Stuff that matters.
Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by jjmarr on Sunday November 30, 2025 @03:23PM (#46100049)
LLVM has very high quality standards in my experience. Much higher than I've ever had even at work. It might be a challenge to get this upstreamed.

LLVM is also very modular which makes it easy to maintain forks for a specific backend that don't touch core functionality.

Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by gregsadetsky on Sunday November 30, 2025 @04:30PM (#46100625)
Super interesting, thanks. I specifically thought that its modular aspect made it possible to just "load" architectures or parsers as ... "plugins"

But I'm sure it's more complicated than that. :-)

Thanks again

Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by zozbot234 on Sunday November 30, 2025 @05:08PM (#46100924)
LLVM backends are indeed modular, and the LLVM project does allow for experimental backends. Some of the custom optimization passes introduced by this MOS backend are also of broader interest for the project, especially the automated static allocation for provably non-reentrant functions, which might turn out to be highly applicable to GPU-targeting backends.

It would be interesting to also have a viable backend for the Z80 architecture, which also seems to have a highly interested community of potential maintainers.

Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by codebje on Sunday November 30, 2025 @06:15PM (#46101443)
https://github.com/jacobly0/llvm-project

... but now three years out of date, because it's hard to maintain :-)

Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by codebje on Sunday November 30, 2025 @06:14PM (#46101437)
My experience is that while LLVM is very modular, it also has a pretty high amount of change in the boundaries, both in where they're drawn and in the interfaces between them. Maintaining a fork of LLVM with a new back-end is very hard.
Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by jjmarr on Sunday November 30, 2025 @06:58PM (#46101772)
I know my company (AMD) maintains an llvm fork for ROCm. YMMV.
Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by codebje on Sunday November 30, 2025 @08:54PM (#46102587)
I should have qualified: it's hard to do for an individual or very small team as a passion side-project. It's pretty time consuming to keep up with the rate of change in LLVM.
Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by ahartmetz on Monday December 01, 2025 @05:42AM (#46105834)
Do you know why it's a fork? Als, from this https://github.com/ROCm/llvm-project/commits/amd-staging/ it looks like it might be more appropriately called a staging branch than a fork.
Re:LLVM-MOS – Clang LLVM fork targeting the 6502 by jjmarr on Monday December 01, 2025 @11:10AM (#46109060)
Various reasons, like embargoes on information, stuff we didn't want to wait for review on before shipping, or features that don't make sense for upstream like `hipcc` which is an `nvcc` wrapper.

Our goal is to get most modifications not in the third category into upstream at some point which makes the maintenance load bearable.