LLVM Weekly - #422, January 31st 2022
Welcome to the four hundred and twenty-second issue of LLVM Weekly, a weekly newsletter (published every Monday) covering developments in LLVM, Clang, and related projects. LLVM Weekly is brought to you by Alex Bradbury. Subscribe to future issues at http://llvmweekly.org and pass it on to anyone else you think may be interested. Please send any tips or feedback to asb@asbradbury.org, or @llvmweekly or @asbradbury on Twitter.
News and articles from around the web
The LLVM blog has a new post about the LLVM security group and its 2021 security transparency report.
The video from the December Women in Compilers and Tools meetup is now available. Sangeeta Chowdhary delivered a talk on “Fast and Precise Approaches to Detect, Debug, and Repair Numerical Errors”.
The schedule for the FOSDEM LLVM devroom, taking place this coming Saturday 5th February, is now available.
Jason Ekstrand provided a retrospective on NIR, the compiler IR introduced into Mesa 7 years ago. The articles covers NIR vs LLVM IR (and LLVM as a project), key NIR design decisions, and more.
On the forums
Tanya Lattner shared next steps for the Mailman to Discourse migration. Specifically, the mailman lists will become permanently read-only as on 10am PST on February 1st. LLVM Discourse will be made read-only for that day while the Mailman import is underway.
The site-wide Discourse ‘mailing list mode’ was disabled and users are encouraged to instead ‘watch’ categories of interest. Mehdi Amini emphasised that when a paid Discourse plan is adopted this week, it shouldn’t need to be disabled. Multiple people on that thread chimed in with comments about their use of mailing list mode, and discussion of limitations of the ‘watch alternative’.
There’s been a lot of discussion this about the Discourse migration, and the the decision making process behind it. Roman Lebedev initiated a thread about the migration, raising questions such as how the decision to migrate was made. Multiple respondents shared similar concerns. Tanya Lattner responded to address specifics about mailing list mode, highlight the need for patience and compassion for those doing the migration, and ways in which people can get involved. Johannes Doerfert pointed out that concerns are sometimes being perceived as accusations, causing frustration on both sides, while James Y Knight suggested that infrastructure projects be coordinated in public through the Infrastructure Working Group. This is clearly a contentious topic, and I’ve taken my usual approach of trying to highlight some key points / messages and to keep the summary as neutral as possible (though for full disclosure, I did participate in this thread). If you feel I’ve missed something important or mischaracterised any discussion, please just drop me an email (and also be assured it’s completely unintentional!).
The slides and recording from the 27th January Open MLIR meeting are now available. The presentation covered “Anatomy of a Linalg Op”, and was delivered by Yi Zhang.
River Riddle kicked off a discussion ‘MLIR Standard Dialect: The Final Chapter’. It provides a run-down of remaining work needed to ‘split and kill’ the standard MLIR dialect.
Vasileios Porpodas posted an RFC on Spill2Reg: Selectively replacing spills to stack with spills to vector registers. It has had positive feedback so far. Quentin Colombet pointed out that spilling to registers is possible with the existing allocator and Vasileios responded with potential challenges using that approach.
Sotiris Apostolakis posted an RFC on cmov-vs-branch optimisation, proposing a new profile-guided target-independent cost/benefit analysis for selecting conditional moves over branches for performance. It shows 0.5-1.5% improvement on x86 internal Google workloads.
Tanya Lattner started a thread to brainstorm on LLVM Google Summer of Code and Outreachy projects, and is suggesting setting up virtual meetups to discuss. “I’m interested in brainstorming how we can improve our project lists, encourage new mentors, and to improve the experience for the participants of either program. I would also like to see how we can get more participants to continue their contributions to LLVM after the mentorship program has ended.”
Russell Wallace queried whether any passes depend on reg2mem. Reid Kleckner and others responded, indicating the answer is no.
Nikita Popov posted about catastrophic inlining with the new pass manager, which is currently a blocker for enabling it with the Rust compiler.
LLVM GPU News issue #27 is out.
LLVM commits
The minimum supported Visual Studio version for building LLVM is now VS2019. 058c5df.
MC layer support for the RISC-V scalar cryptography (Zk*) extensions was added. e29d8fb, 70f83f3.
The IROutliner can now outline indirect function calls. f5f377d.
The documentation on LLVM’s bug lifecycle was updated to reflect the move to GitHub issues. f3e2294.
Support for floating point operations was added to the CSKY backend. 4ad517e.
orderFrameObjects was implemented for SystemZ. f541a50.
The array waymarking algorithm implementation was removed as it is not currently used by anything in tree. f489e86.
Clang commits
As part of supporting the C2x
_BitInt
feature, the BITINT_MAXWIDTH macro is now defined, indicating the maximum width of a bit-precise integer type. 86797fd.The readability-duplicate-include check was added to identify and remove duplicate includes. d2e8fb3.
Clang now matches GCC’s behaviour around alignment of non-POD (plain old data) members in packed structs. 2771233.
The readability-container-contains check was added, recommending replacement of
container.count()
andcontainer.find() = container.end()
withcontainer.contains()
. 3696c70e.Additional documentation was added on developing clang-tidy checks. 8ce99da.
Other project commits
A ControlFlowSink pass was added to MLIR. 572fa96.
POSIX close, fsync, open, read, write, creat, and openat functions were added to LLVM’s libc. dc2b01b, 4abfe47.
A single byte coverage mode was added for instrumented profiling. This only tells you if a function has been covered or not, but offers very low binary size overhead (4.9% on an instrumented clang when combined with debug info correlation). 11d3074.
Preparatory work was committed for BOLT unit testing. 20e9d4c.
Flang can now lower a simple empty program to FIR. e1a1276.
LLD’s
--compress-debug-sections=zlib
is now parallelised. 4cdc441.