My team at Apple is currently hiring for a role that focuses on compiler tools and infrastructure. If you’re interested in this opportunity, please take a look at the job posting here: https://jobs.apple.com/en-us/details/200613714/compiler-tools-engineer?team=SFTWR #llvm #swiftlang
How you don't want to spend your Saturday: figuring out how many regressions #LLVM developers managed to sneak in just before the 21.x branching, and then bisecting them.
The answer: 2 serious regressions breaking libclc build and install, 2 test regressions in clang and compiler-rt respectively (the former quickly reverted on main, for the second time, but nobody thought of backporting), and 1 assertion failure in experimental backend.
Now I really hope I'll manage a clean run for 21.1.0-rc1 with the biggest zero-day LLVM patchset in the history of #Gentoo.
LLVM downstream maintenance is a nightmare.
I PR Validates
Off and on for the past bit of time I've been iterating on a new command+control server. It's nothing terribly complicated, more so that it's being optimized for its role with my baseline reqs for a tolerable (nearly enjoyable) Linux system when I cannot use FreeBSD or Solaris.
- LLVM 20, Clang, Ccache, OpenRC
- UEFI stub for boot (no grubs or potterings)
- ZFS on Root v2.3 with 3x NVMe drives in draid1
- ZFS Native AES encryption on the pool
- ZFS split-fs for usr, var, home
- COM redirect at boot for headless operation
- DMI and hardware locality captured for refs
- Block info and disk partition exports for refs
So, here are two of the ongoing repos which track this effort. Trickle down tech, this build informs adjacent and sub-type systems which will fulfill various private cloud cluster roles and bare-metal core systems. Eventually I'll write about this on the blog, but not today.
- https://codeberg.org/rfc1918/gentoo-stage4-cmdctrl/pulls/1
- https://codeberg.org/rfc1918/gentoo-stage4-cmdctrl/src/branch/master/README.md
I'm very lucky to have a very dedicated reviewer for HashRecognize: found and fixed quite a few sources of potential miscompiles, ahead of landing the optimization bit. I can now say that HashRecognize has two authors! #LLVM
Y'all wanna see an excessively cute trick LLVM's optimizer can do?
Swift String contains roughly this method:
```
func _fastCStringContents() -> UnsafePointer<UInt8> {
if isASCII {
return contentsPointer
}
return nil
}
```
Where `isASCII` is defined as `(flags & 0x8000_0000_0000_0000) != 0`
Would you expect this to generate (solution in reply)
@artificialmind Nice! Thank you for the kind words!
Your own programming language!? This sounds really cool! We need those ambitious goals!
I wish you great success!
The following might be helpful in your journey (they are one of the best resources I know about #Parsing, #Compilers etc.):
A tutorial on how to write a #compiler using #LLVM:
https://tomassetti.me/a-tutorial-on-how-to-write-a-compiler-using-llvm/
A Guide to Parsing: #Algorithms and Terminology
https://tomassetti.me/guide-parsing-algorithms-terminology/
I have solid proof that this approach works, at least for me: I’m in the top 1% of upstream #LLVM contributors over the period of employment.
Unfortunate news: I had to withdraw my talk proposal for the US #LLVM conference, as I cannot attend. My employer's priority is to extend the runway until a possible sale, and must cut all non-critical expenses.
Alas, looks like I’m going to have to switch from an LLVM to a GNU toolchain for this embedded ARM project, because LLVM doesn’t yet fully support the ARM FDPIC ABI—which is what supports multiple clients of a shared library with shared text and distinct read/write data on an MMUless system. (It works by making a loadable module’s globals relative to r9, just like the original PowerPC ABI made them relative to r2.) #llvm #embedded
2025 AsiaLLVM Developers' Meeting Talks
Videos: https://www.youtube.com/playlist?list=PL_R5A0lGi1ADKfJbzpA0rMDCb5T3QGe5k
Slides: https://llvm.org/devmtg/2025-06/#program
#LLVM #MLIR
[some] 2025 AsiaLLVM videos are up!
(There will probably be more videos uploaded & added to this playlist over the next week or so.)
#LLVM #Clang
https://www.youtube.com/playlist?list=PL_R5A0lGi1ADKfJbzpA0rMDCb5T3QGe5k
@katyswain I din't think that #CCSS is good either, but the demands of #GPLv3 are not compatible with the (adnitteldy shitty) reality of how #IP, #Licensing and #Patents work and thus it kneecaps a lot of things.
GPLv3 caused #Apple to freeze their #bash version and divest into #LLVM and adopt #zsh.
As @landley showed, enforcing the #GPL(v2) resulted in exactly 0 code being committed to #BusyBox and it only made said project look toxic and litigatious.
Also i've yet to see anything happen re: #paywalled #SourceCodeAccess for #grsec & #RedHat #Linux. Maybe #GPLv4 will ban #paxwalling and force violators to work on #GNU / #HURD?
I chose #0BSD for _OS/1337 because as with any "intellectual labour", one cannot force others to collaborate and I'd rather have people join in out of the goodness of their hearts instead of just dumping some random git commit that is useless.
I'm trying out #GenAI in the context of writing code. My conclusion based on a few days of intensive use is that it is alpha-quality, with a suggestion reject-rate of 95% on any real software project like #LLVM. The 5% of good suggestions appear when you're editing one instance of a pattern, and want to change all instances; things like paren-matching are also taken care of automatically. The little automation comes at the cost of putting up with bad visual feedback nearly all the time, and it can take some time to get used to. It is, by no means, "smart", but this technology offers a way to automate things that can never be automated by classical software.
I also tried it on a toy project: a tree-sitter-based LLVM IR parser. In this case, the entire task is a mechanical chore of reading docs/ample examples and encoding the knowledge in the parser. For kicks, I tried to generate the entire parser with the technology, and the result turned out to be so bad, I had to delete it. Then, I started writing the parser, and the suggestions were actually quite good. The best part? I generated 300 tests to exercise the parser automatically (I had to tweak very little)! Of course, the tests aren't high-quality with over 30% redundancy, but this is a toy project anyway, so who cares?
if you think ‘working with other people whose goals don’t 100% align with yours’ is a bad thing, please avoid LLVM.Well, to be fair, I try not only to avoid #LLVM but any #programming language based on it.
Go home, Clang, you are drunk!
I just published our next #LLVM #Meetup in #Darmstadt (Germany) on Wed. 30th July, starting 7pm.
We will have Lukas Sommer from #Codeplay talk about "Compiling Machine Learning Models with #PyTorch 2.0 and #Triton"
RSVP at https://www.meetup.com/llvm-social-darmstadt/events/308590919
https://github.com/llvm/llvm-project/commit/b9e173fcd46b336b5589f577a74de9472d4deae3 nice! why didn't anybody tell me?
before `clang-format -style=file` would still exit with 0 and edit the source files, even if the style file isn't found (setting where the style file is not in git, because multiple git repositories, so the style file is kept elsewhere).
looks like it came with clang-format 14 (e.g. available in ubuntu 22.04 LTS)