LLVM Weekly - #568, November 18th 2024
Welcome to the five hundred and sixty-eighth 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 via email: asb@asbradbury.org, or Mastodon: @llvmweekly@fosstodon.org / @asb@fosstodon.org, or Bluesky: @llvmweekly.org / @asbradbury.org.
News and articles from around the web and events
If you’re a Mastodon person then hopefully you’re already following @llvmweekly@fosstodon.org. LLVM Weekly is now also on Bluesky and I don’t intend to update Twitter going forwards.
MaskRay blogged about removing global state from LLD.
Neil Henning wrote up work to add custom runtime togglable asserts in an otherwise unmodified LLVM codebase.
Stefanos Baziotis wrote a high level overview of some common compiler optimisations.
The MLIR and LLVM related activities at SC'24 are summarised here.
According to the LLVM calendar in the coming week there will be the following:
- Office hours with the following hosts: Phoebe Wang, Johannes Doerfert.
- Online sync-ups on the following topics: pointer authentication, vectorizer improvements, security group, new contributors, Clang C/C++ language working group, Flang, floating point, SPIR-V, RISC-V, LLVM libc, MLIR.
- For more details see the LLVM calendar, getting involved documentation on online sync ups and office hours.
On the forums
David Spickett shared news of the major usability improvement now implemented through better test result reporting of Buildkite pre-commit checks. Thank you David!
James Y Knight kicked off a discussion on C calling convention lowering to LLVM IR.
Tobias Hieta shared an update on the 19.1.4 release which is now planned for 19th November.
Alex Bradbury shared a PSA on recent improvements to llvm-zorg buildbot configuration testing. Specifically, there’s now a documented and working flow that allows you to test a builder locally before submitting to llvm-zorg, and llvm-zorg now has precommit checks via GitHub Actions using this.
Daniel Thornburgh discussed code size optimisation for printf in LLVM’s libc, and Simon Tatham contributed a summary for how the Arm toolchain managed printf optimisations.
Marek Sedláček started a discussion on IR2Builder, a convert from LLVM IR to equivalent C++ IRBuilder calls. As noted by some of the replies, LLVM had something along these lines a long time ago - the “C++ backend”.
Justin Bogner suggested LLVM_EXPERIMENTAL_TARGETS_TO_BUILD isn’t helpful and LLVM should have one class of target, detailing some of the issues. It’s early stages for the discussion, but there’s some opposing views being presented currently.
Félix Cloutier started an RFC thread on introducing
__attribute__((format_like))
with the goal of making-Wformat-nonliteral
more useful.Raghesh Aloor proposed the vector data dependence graph visualisation tool for inclusion in LLVM.
Renato Golin posted an RFC to move tensor.path and tensor.unpack into the linalg MLIR dialect.
Alexander Richardson suggested supporting fine-grained non-integral pointer properties.
Max would like to extend LLD’s MachO linker’s balanced partitioning feature to ELF LLD.
Rahul Joshi ponders whether
- C++ -
is still useful in header files to help text editors determine the header is C++ rather than C.Markus Böck started an MLIR RFC discussion on making LLVMStructType immutable.
LLVM commits
A global function merging pass was implemented. d23c5c2.
The new IRNomalizer pass transforms LLVM modules into a normalised form by reordering and renaming instructions while preserving the same semantics. 2e9f869.
Guidance on merging locations in debuginfo was updated. 6d23ac1.
LLVM learned to emit a
prologue_end
in as suitable as place as it can manage for pathological inputs. b468ed4.Profile data is no longer used to flip branch conditions when using optsize, or to direct MachineSink. b8d6659, 57c33ac.
The CodeExtractor saw a large refactoring f6795e6.
There is now a working and documented flow for testing a new buildbot builder configuration locally (e.g. if adding a new builder, or modifying an existing one). 8da61a3.
lit gained a
--report-failures-only
option to only list failures in the XUnit XML test report. c63e83f.The DXILFlattenArrays pass was added to flatten arrays for the DirectX backend. 5ac624c8.
The new
-emit-func-debug-line-table-offsets
option can be used to enable per-function line table offsets and end sequences in DWARF. This allows tools to attribute line number information to their corresponding functions even if functions are merged. f407dff.llvm.experimental.vector.match and llvm.experimental.vector.extract.last.active intrinsics were added. e52238b, ed5aadd.
The high bits of AArch64 FPR and GPR registers are now defined, as a step towards enabling subregister liveness tracking. c1c68ba.
A llvm.experimental.memset_pattern intrinsic was added. 298127d.
Clang commits
[[clang::lifetime_capture_by(X)]]
is now supported, which can be used to specify when a reference to a function parameter is captured by ‘X’. 8c4331c.Support was introduced for diagnostics suppression mapping files. e.g. suppressing warnings for certain headers. 41e3919.
webkit.UncountedLambdaCapturesCheker learned to ignore trivial functions and those passed with
[[clang::noescape]]
, lowering the false positive rate. 2c6424e.clangd’s ModulesBuilder was rearchitected to improve performance. e385e0d.
Other project commits
Work to remove global state from the LLD ELF linker was completed. 73bb022.
compiler-rt gained a libcall for fp128 to bf16 conversion. 28e4aad.
LLDB can now be built against either Lua 5.3 or Lua 5.4 (rather than just 5.3). e19d740.
MLIR’s Python bindings now allow converting boolean numpy arrays to and from MLIR attributes. 1824e45.
LLVM Offload now has minimal support for riscv64 in its host plugin. b6bd747.