maskray.me/blog/moving-llvm-… Moving llvm::cl options to TableGen
2
12
843
An explainability story. I had models write parallel input parsing and symbol resolution for lld/ELF several times:
- Opus 4.6/4.7: failed
- Opus 4.8/5: ~1,250 net lines, small speedup
- Fable 5: ~900 lines, decent at --threads=8
- Fable 5.2: ~400 lines, beats both
Meanwhile,
a 100-line NFC patch I can explain (#238701) cut link time at 8 threads by 17% (clang) and 20% (Chromium). Fable 5.2's 400 lines replace it and cut another 7% and 13%.
2
38
5,575
Jen-Hsun Huang Engineering Center, 475 Via Ortega 3rd Floor, Stanford, CA 94305 – at Stanford, CA
6
706
GLIBC_TUNABLES=glibc.malloc.top_pad=67108864 or glibc.malloc.hugetlb=1 can make lld/ELF significantly faster. hugetlb=1:
Chromium: faults 678K→227K, 9-12% faster
clang (release): 8-10% faster
clang (debug): 6% faster
lld 24 markLive: each thread marks live sections depth-first on its own stack. Once one runs out of chunks, the others move their stacks to the next level.
Chromium: 519→384 ms (1 thread), 150→114 ms (8 threads)
Thanks to Jez Ng for finding this pattern in lld/MachO.
7
739
Since June, lld has been getting AI-drafted bug reports in batches. Since late October they end with "a possible fix", and some rando turns each into an AI-assisted PR: the suggested fix verbatim, the reproducer pasted in as the test. Review lands on the maintainer twice.
maskray.me/blog/2025-02-17-m… "Unfortunately comments from Disqus have not been migrated yet" => I imported the comments from the Disqus export (`comments.xml`) with an Opus 5.5-written Python script that calls the GitHub GraphQL API via `gh api graphql`.
lld 24.x optimization preview: parallel symbol interning. Linking clang-release at --threads=8: 181 -> 151 ms
1
15
836
lld linking Chromium (CREL, --icf=all): 3.46 -> 2.08 s. In chromium-debug, Moore's partition refinement algorithm performs poorly.
In 2020, reviewing lld's --optimize-bb-jumps (reviews.llvm.org/D68065), I asked that the pass run inside finalizeAddressDependentContent "to accommodate thunks and linker script symbol changes." The author replied: "Could we do this in a later patch?" There was no later patch.
1
14
1,299
and another lld maintainer independently flagged the misplacement and found my 2020 comment.
When I left Google in 2024, --optimize-bb-jumps still had no users. The answer was always "we will use it." Today nothing in llvm-project passes the flag; only three lld tests do.
1
3
282
That placement was a wrong-code bug from day one: the pass shrinks .text after .relr.dyn is computed, so RELR entries point at the wrong words.
Since a change this year, .eh_frame_hdr search keys go stale too.
An AI-assisted patch surfaced it recently,
2
2
408
maskray.me/blog/who-pays-for… Who pays for Clang
Another AI slop post. Commits by employer, What each funder works on, Review, Shared and vendor-specific work
I spent many hours driving the agent through Discourse threads, slides, source trees, and LinkedIn profiles to generate this AI slop: maskray.me/blog/clangir-and-… ClangIR and the cost of MLIR
Comment on "RFC: Enable ClangIR Build By Default-" discourse.llvm.org/t/rfc-ena… Current feeling: it might be a huge opportunity cost
120
The new funders build GPU and accelerator compilers, and their other compilers (Flang, Triton, IREE, their own stacks) are built on MLIR. For them, a Clang that emits an MLIR dialect is the point, not an implementation detail.
1
8
692








