LLVM Weekly - #512, October 23rd 2023
Welcome to the five hundred and twelfth 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, @llvmweekly or @asbradbury on Twitter, or @llvmweekly@fosstodon.org or @asb@fosstodon.org.
News and articles from around the web and events
Nikita Popov has written up a fantastic guide on how to ‘reduce’ LLVM crashes to minimal test cases.
JeanHeyd Meneide blogged about implementing #embed support for C and C++, covering proposed implementations in both GCC and Clang.
Daniel Kleinstein wrote up a guide on tracing memory access with an LLVM pass.
Linaro have documented work underway to track code size variations between LLVM releases.
According to the LLVM calendar in the coming week there will be:
- Office hours with the following hosts: Kristof Beyls, Amara Emerson, Johannes Doerfert
- Online sync-ups on the following topics: MLIR C/C++ frontend, pointer authentication, OpenMP, RISC-V, LLVM libc, MLIR, SPIR-V.
- For more details see the LLVM calendar, getting involved documentation on online sync ups and office hours.
On the forums
Mehdi Amini started a discussion on if the LLVM project should do something about ‘hidden’ emails on GitHub.
Further notes were shared from the LLVM dev meeting: presubmit testing roundtable, AArch64 round table, embedded toolchains workshop, and the embedded toolchain roundtable. Thanks to those who took notes!
David Spicket has proposed adding TableGen to the much-loved Compiler Explorer and is asking for any comments from the LLVM community.
Johannes Doerfert proposed introducing llvm-project/offload to bring together work on offload (e.g. to other CPUs, GPUs, AI accelerators, FPGAs, etc) runtimes.
Utkarsh Saxena posted an RFC on lifetime bound checks for parameters of coroutines.
Arthuer Eubanks proposed exposing the ghccc calling convention as preserve_none to clang.
jeffreytan81 kicked off an RFC thread on improving the type lookup/parsing speed for Dwarf 5 .debug_names.
There are new regular meetings set up for LLVM libc, GlobalISel, and AArch64. There was also a reminder about the Clang Language Working Group meetings.
The LLVM Code of Conduct Committee shared a warning on submitting code or review comments on someone else’s behalf.
Benjamin Maxwell updated on the status of the Arm Scalable Matrix Extension dialect in MLIR.
Steve Scalpone noted a new Flang liaison report is now available.
Louis Dionne is pinging for further feedback on the RFC on hardening in libc++.
Sergey Kachkov proposed adding support for SIMD within a register (SWAR) loop vectorisation.
LLVM commits
The new
optdebug
function attribute can be used to specify that optimisations should prioritise debug info quality. df3478e.A new tablegen keyword
dump
was introduced, used for printing a message to stderr for debugging purposes. db9b6f4.Support was added for the new X86 USER_MSR instructions. 819ac45.
The FoldImmediate hook was implemented for X86. 760e7d0.
LLVM_GTEST_RUN_UNDER
can now be set to define a wrapper program that LLVM unit tests should be run under, and sharding can be disabled. dd64c82, 6eee238, 44d4b30.It’s now possible to set linker flags for different targets within LLVM (e.g. it might not be worth optimising with LTO for helper programs like llvm-dwarfdump). e90ec58.
evaluateBranch
was implemented forauipc/jalr
pairs on RISC-V, meaning llvm-objdump prints the target in these cases. 95f924f.
Clang commits
A new builtin
__builtin_vector_elements()
was introduced which gives the number of elements for a given vector, either at compile-time or via a runtime call in the case of scalable vectors like in SVE or RISC-V. de65b6b.Use of SSE4.2 in Clang’s lexer provides ~1.5% faster preprocessor time for the sqlite3 amalgamation. 9f0f606.
The unix.StdCLibraryFunctions checker is no longer ‘alpha’. c202a17.
The C23 stdcdkint.h header is now provided by Clang, providing macros for checked integer arithmetic. 3694697.
Clang now warns about uses of variable-length arrays in C++ by default. 84a3aad.
New clang-tidy checks were added to diagnose “coroutine-hostile” RAII objects and bugprone casting through void. 3151281, 9a5c6f1.