L
Summary asm goto with outputs miscompiles in ways that keep coming back, one pass at a time. The cause is how INLINEASM_BR is modeled in MIR. Since 2020 it has been a non-terminator modeled on invoke: it can leave its block from the middle, toward its indirect targets. That model was sound when it was adopted, because the asm’s outputs weren’t defined on the indirect paths. Since 2023 they are, and a value that leaves a block from the middle of it is something no MIR pass expects. I propose…
L
Currently, llvm/utils/git/requirements_formatting.txt specifies that black version 23.x is to be used in CI. black versions before 24.8 mis-parse some scripts with valid f-strings (see e.g. black #4401) and this broke CI on a PR of mine, so I would like to update to a formatter that does not have this problem. We have the following options for formatters: The current black version (updating from 23.x to 26.x) The earliest black version that fixes the bugs, to minimise the impact on the current…
L
Hi all, I came across an interaction between loop-idiom and loop-unroll that I’d like some feedback on. Given this IR, where llvm.assume constrains the trip count has a upperbound. declare void @llvm.assume(i1) define void @assume_with_eq(ptr noalias %dst, ptr noalias %src, i32 %sz) { for.body.preheader: %cond = icmp eq i32 %sz, 8 tail call void @llvm.assume(i1 %cond) br label %for.body for.body: %i.04 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] %dst.addr.03 = phi ptr […
L
## Summary We propose a Clang option that does function multi-versioning automatically: ``` clang -O2 -fauto-target-clones=x86-64-v3,novalake app.c ``` The compiler selects the functions where specialized code is likely to pay off, compiles each of them for the normal baseline and once more for each requested target (an ISA level or a CPU), and adds a run-time dispatcher. The binary still runs on every CPU the baseline supports, and uses the specialized code on CPUs that have the target’s…
L
I propose a StoreInstCombiner that describes integer stores using two ranges in memory. This lets us compare stores of different widths and offsets and find opportunities to combine updates, remove overwritten stores, or write fewer bytes. Access and Update Access is the full range written by the store, computed from its address and its store size in DataLayout. Update is the range of bits the store may change. To derive a smaller range, the combiner must prove that the remaining bits come from…
L
Summary We (Google) are working to make CFI (Control Flow Integrity) something that can be deployed significantly more easily and at a larger scale than it has been until now. This includes: Building on the kCFI model of hash-based enforcement Expanding it to virtual functions and vtables in C++ Adding source annotations (or other techniques) to narrow the sets of valid CFI targets Exploring ways to use the same techniques for backward-edge CFI when we don’t have hardware support available (PAC…
L
LLVM Weekly - #673, November 23rd 2026 If you prefer, you can read the canonical version of this issue at https://llvmweekly.org/issue/673. Welcome to the six hundred and seventy-third 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 https://llvmweekly.org and pass it on to anyone else you think may be interested. Please send any tips or…
L
Sharing an open call from FlagOS Community for LLVM/MLIR and compiler developers working on AI programming, code generation, kernels, and cross-architecture optimization. TritonNext 2027 takes place January 22–24, 2027, in Beijing, China. We welcome two kinds of contributions: Technical talks and posters Research, work in progress, engineering experience, and open-source demonstrations are welcome. Relevant topics include kernel languages, compiler optimization, agent-driven kernel generation,…
L
Hi, I am trying to improve my understanding of the differences between the use case for the alloc_tensor operation from the bufferization dialect and the tensor.empty op from the tensor dialect. Currently, my understanding is that the former operation will always bufferize to a new memory allocation while the latter may or may not, depending on its use in the IR and what the bufferization pipeline determines needs to be a new allocation. I am particularly confused when it comes to DPS…
L
TL;DR Linear typing is useful in quantum compilation and has been adopted by various projects. Could there be upstream support of linear typing? Linear Type Systems and Quantum Compilation A linear type is a type whose values must be used exactly once (getUses().size() == 1). It is usually enforced by the type checker, typically with a use-counting (usage, 0 or 1) annotation on every variable. If you want to use a linear value twice, the program is rejected at compile time. Consequently, the…
L
Hi everyone, We’ve recently started AutoPEAC, a European COST Action on autotuning. The Action supports collaboration and networking across academia and industry by helping cover travel costs for research visits and meetups across Europe, with no long-term commitment required. We’re looking for people with MLIR experience who’d like to explore autotuning for MLIR-based compilers with us. Students, researchers, and engineers are all welcome. If you’d like to join us, you can apply through the…
L
Hi all, Linaro is retiring a set of AArch64 buildbot workers hosted on AWS Graviton 3 and Graviton 4 machines. What’s changing Two builders will be removed entirely, because they run only on the Graviton 3 workers being retired: clang-aarch64-sve-vla clang-aarch64-sve-vls Their 2-stage counterparts, clang-aarch64-sve-vla-2stage and clang-aarch64-sve-vls-2stage, continue to run. SVE VLA and VLS codegen remains covered. Following Linaro workers will be removed: linaro-g3-01 to linaro-g3-04…
L
Hi, I am the maintainer of uClibc-ng. I am curious if upstream support for LLVM would be interesting to anyone. My uClibc-ng Co-developer Ramin opened up a PR to add support for libsanitizer here: Pull request llvm/llvm-project [compiler-rt][sanitizer] Add support for uClibc-ng (#199773) main ← lordrasmus:submit-uclibc-ng-support lordrasmus opened 09:40PM - 26 May 26 UTC +62 -8 ## Add AddressSanitizer/compiler-rt support for uClibc-ng This series teaches t…he sanitizer runtimes to build and run…
L
Issue #59263 describes a problem with diagnostics originating from GoogleTest and GoogleMock macros. These diagnostics are reported at macro invocation sites in user code, making them difficult to suppress without adding NOLINT comments. LineFilter operates on expansion locations, while HeaderFilterRegex and ExcludeHeaderFilterRegex cannot exclude diagnostics from macro-body tokens expanded in the main file. None of these options can filter diagnostics based on the file containing the macro…
L
I looked at some detailed books about the LLVM compiler on the market, and most of them cost at least 130 RMB (and whether I could even finish reading them is another matter). Because I want to advance my knowledge in this area (mainly because I feel that the definitions given by the large LLM are slightly inaccurate, and it’s more practical to consult lengthy books for more information). A large part of the reason I bought the books was that I encountered bottlenecks while studying the source…
L
I propose that LLVM prefer LLVM libc when evaluating math library calls that the optimizer already knows how to fold. I’d start with sin and sinf and consider other functions individually. The motivation is that the machine running the compiler can influence the constants LLVM emits, even when the LLVM revision, input IR, and compilation target are the same. Why change this? When LLVM replaces a call to sin with a constant, the result becomes part of the program. Today the optimizer asks the…
L
I’m exploring how a custom frontend/language interacts with LLVM’s optimization pipeline, specifically around deciding which passes or optimization levels are worth their compile-time cost early on. When lowering custom IR/AST into LLVM IR, it’s tempting to just rely on standard pipelines like -O2, yet it isn’t always obvious which passes give the biggest win for typical patterns generated by a new or specialized frontend versus adding noticeable compile-time overhead. Specific question: For…
L
Encountered in [libc++] Updates Unicode tables to Unicode 18 by clin1234 · Pull Request #199111 · llvm/llvm-project On both 32-bit and 64-bit AIX, libcxx-ci is failing with ` Assertion failed: i1 == 37, file /scratch/powerllvm/h3ncloudppc5/llvm-project/libcxx-ci/libcxx/test/libcxx/atomics/clear_padding.pass.cpp, line 285` when compiling with IBM Open XL C/C++ for AIX 17.1.5 (5725-C72, 5765-J18), version 17.1.5.0, clang version 23.1.4 (build 0ca52e1 0ca52e135f772424d7ef0fb4d8c11e276e4ea755)…
L
Comment llvm/llvm-project Comment by llvm-ci - [mlir][linalg] Scaled contract decomposition main ← adam-smnk:linalg-scaled-contract-decompose LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla-2sta…ge` running on `linaro-g4-02` while building `mlir` at step 5 "cmake stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/12282 <details> <summary>Here is the relevant piece of the build log for the reference</summary> ``` Step 5 (cmake…
L
1. Introduction Full unrolling replaces a loop with copies of its body for all iterations. It removes loop control and makes originally loop-carried dependencies explicit between the copies, exposing opportunities for constant propagation, redundancy elimination, and vectorization. It can also increase code size and compilation work. The current LLVM full-unroll heuristics estimate loop size and execution cost before and after unrolling. They simulate iterations and use the predicted savings to…
L
Hi, I’m working on an undergraduate dissertation using LLVM to optimise event-processing loops. My current method learns which handler usually follows another and creates a checked direct path between them. If the prediction is wrong, execution falls back to normal dispatch. The transformed program also uses ordinary PGO. So far, I’ve tested this on small synthetic benchmarks. It helps in some cases, but changes in event order can cause slowdowns. I’d appreciate advice on related LLVM work or…
L
This is a follow-up to the previous RFC on minimal nl_langinfo and static UTF-8 locale support. While landing the internal locale plumbing (#211470) and nl_langinfo (#243540), Michael Jones and I got talking about whether LLVM-libc should support changing the locale at runtime at all. This RFC captures the gist of that discussion, and we want to solicit opinions to figure out what matters to people. The idea is to keep the default state of the libc fixed at C.UTF-8 (or whatever single default…
L
Hi all, I’m fairly new to the LLVM community, so please let me know if I’m going about this the wrong way. I am developing a tool that tests MLIR automatically. It has found about 100 bugs that are not reported yet. Following HowToSubmitABug.md, and after reading the discussions in Fuzzing MLIR Infrastructure and Seeking advice on reporting MLIR fuzzer findings, I’d like to agree on how to report them. I filed 15 earlier findings one at a time over the past month, before I knew about the…
L
I propose putting clang-tidy lit tests under clang-tools-extra/test/clang-tidy/checkers/<module>/<check>/. New checks would use this layout, and existing checks could move incrementally. Motivation When I’m working on a clang-tidy check, I want one command that rebuilds what changed and runs that check’s tests. For modernize-use-auto, the existing Ninja target runs all 165 tests in modernize. I can run the seven use-auto tests directly with lit, which uses the clang-tidy binary already in the…
L
I found bugs related to the assembler and inline assembly using a fuzzer and automated testing. Given the recent discussion about fuzzing and the increasing number of issues, I would like to share my findings and seek advice on how to report issues, rather than just submit many issues. I have already submitted some of them. I am sorry that I had not noticed the recent discussion before submitting them. To begin with, I would especially appreciate advice on which kinds of cases are worth…
L
Hello community In the beginning of 2026, I joined the LLVM community with the dream of becoming a compiler engineer. Since then, I’ve been mentored by many people in the community, and there are many things I’ve told people I would do. Even just last week, I exchanged contacts with people at a LLVM meetup. I think it is not a manner to suddenly disappear, so I am writing this post. Last weekend, my father was diagnosed with stage 4 stomach cancer. So, I’m heading to South Korea to take care of…
L
This RFC proposes replacing LLDB’s optional libxml2 dependency with a minimal XML 1.0 parser which lives in the mono repo. Motivation libxml2 is not really optional in LLDB. It is required for gdb-remote target.xml, memory maps, library lists and dSYM plists files. If LLDB is built without libxml2, register info, loaded module lists and source remapping don’t work. On Windows it prevents testing lldb-server. libxml2 is not installed by default on Windows. Installing it at desk is awkward…
L
[libc++] Updates Unicode tables to Unicode 18 · llvm/llvm-project@f7ffa95 and [libc++] Updates Unicode tables to Unicode 18 · llvm/llvm-project@753c9ed conflict with each other… Sourced from [libc++] Updates Unicode tables to Unicode 18 by clin1234 · Pull Request #199111 · llvm/llvm-project · GitHub 1 post - 1 participant Read full topic
L
Summary This RFC proposes making LLVM’s BTF emitter usable on any ELF target behind an opt-in -gbtf flag. GCC already uses the same flag spelling. With the flag, the compiler emits .BTF and .BTF.ext describing the types, functions, and global variables of the translation unit. Without the flag, behavior is unchanged. The current patch is #183929. This thread covers the compiler side only. It does not need a linker change: the kernel already deduplicates BTF after the link (in resolve_btfids),…
L
Hi, To fix profiler hangs in Firefox’s TSan builds [1], we’re adding a TSan-only interposer of libc’s syscall() that brackets SYS_futex with __sanitizer_syscall_pre_futex / __sanitizer_syscall_post_futex [2]. There is also a proposal for Rust’s std to call the same hooks around its own futex wait [3]. If both happen, a Rust futex wait would run: std: __sanitizer_syscall_pre_futex(...) interposer: __sanitizer_syscall_pre_futex(...) syscall(SYS_futex, ...) interposer:…