XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

LLVM Discussion Forums - Latest topics

Latest topics

How to get a PassBuilder instance?

In the fource chapter of the Kaleidoscope tutorial on line 594: PassBuilder PB(*TheContext); I get an error: there is no constructor for PassBuilder accepting a LLVMContext. Indeed, I looked at PassBuilder.h and couldn’t find one. What is going on here? Is the tutorial outdated? How to resolve this? I’m on llvm version 22.1.8, release 4.fc44 2 posts - 2 participants Read full topic

LLVM Dev Meeting 2026 RISC-V Roundtable Notes

Thanks @lenary for hosting. RISC-V’s roundtable this year attracted (a lot) more attendees compared to last year (I believe Sam wrote down some of the names?). We didn’t spend lots of time on specific topics, mostly just did a quick round on topics / questions people can think of. Here are the notes: Embedded PIC (ePIC): the general consensus is try to have a single ABI rather than, say 5 of them The x86lint / armlint’s author shared some details on the tools. Specifically, the patterns used by…

Should flang limit the number of nested parenthesis?

See [flang] Segmentation fault (parser stack overflow) on expressions nested about 600 parentheses or 418 function calls deep · Issue #236881 · llvm/llvm-project · GitHub . Should flang perhaps support -fbracket-depth like clang does? Where would it matter in practice? I’ve seen lots of automatically generated Fortran code from customers that has weird constructs, which are taxing on the parser and semantic analysis. I haven’t seen this particular case, but since clang supports a similar limit,…

[RFC] TableGen-generated legalizer rules — prototype on X86, looking for a reviewer

Seven backends still carry a hand-written legalizer rule chain plus a line saying it should be generated (AArch64, AMDGPU, ARM, M68k, Mips, RISCV, X86 – “\todo This should be generated by TableGen”, in tree since 2016/2017). The other three GlobalISel subsystems already have a TableGen backend: -gen-global-isel, -gen-global-isel-combiner, -gen-register-bank. Legalization is the last one without one. I built a prototype: a -gen-legalizer backend (not upstream) plus X86 converted to a .td.…

[RFC] Add a driver option to specify C library header directories

Would a C counterpart to -stdlib++-isystem be an acceptable addition to Clang? It would let us supply explicit libc header roots while the driver preserves its target-specific ordering relative to C++ and builtin headers. Motivation I maintain hermetic-llvm, a hermetic LLVM-based Bazel toolchain for cross-compilation. Its compiler, libc, Linux UAPI, and C++ library headers are separate build inputs, rather than a preassembled target sysroot. It is also the @llvm toolchain selected by LLVM’s own…

[RFC] Tree-wide audit of Pure / AlwaysSpeculatable ops with documented UB (and maybe a TableGen lint?)

Hey everyone, Following up on the LICM bug we discussed in #233213, the initial fix in #235770, and and our recent thread on [arith integer division and remainder UB semantics]( UB Op Semantics of `arith` Integer Division / Remainder ) I decided to run a quick static audit across ~20 dialect .td files in MLIR. I wanted to see how common it is for an op to be marked Pure (or AlwaysSpeculatable), while its docs actually mention Undefined Behavior, trapping, or potential traps in regions. Since…

Xbox 360 target for LLVM

I’ve been working on adding proper Xbox 360 target support to LLVM and wanted to discuss some architectural/design things before continuing on with the entire set of changes. For context/motivation, please read the main body of this PR: Add plumbing for Xbox 360 target by landaire · Pull Request #235915 · llvm/llvm-project · GitHub @alexrp helpfully pointed out that the existing PS3 target (Lv2) is similar to Xbox 360, and I’ve been refactoring a bit to try to share logic where possible. The…

Does an LTO recompile add information to help with debug?

Hi All, One of the biggest obstacles that I hear about from internal and external customers re: hesitancy to use LTO for application builds is the difficulty in debugging issues when problems arise. Even though an application appears to be working fine without LTO enabled, some issues don’t get exposed until cross-module optimizations are turned on in the LTO recompile. Has there been any exploration into adding debug information during an LTO recompile to help with debugging an application…

[RFC] make `dwim-print` use DIL more: detect overloaded operators and emulate operators in DIL

Background The command dwim-print uses DIL in Simple mode, which handles only identifiers and the . operator, because DIL ignores the operator’s overload definition, and return a different value from what the full expression evaluator would return. This is mentioned in dil.md, If DIL is used in a situation where an operator has an overloaded definition, DIL will ignore the overloaded definition, and therefore return a result different from what the full expression evaluator would return. This…

Beginner’s Guide to MLIR’s linalg dialect

Hi everyone, I wrote a short article about linalg dialect, and linalg.generic more specifically. The intention was to make it less “mathy” as most of the official docs, and also to look at it from a different perspective (“fancy loop notation”). I hope it can be of help for the folks getting started with this area lowlevelbits.com Beginner’s Guide to MLIR’s linalg dialect A beginner’s guide to MLIR’s linalg dialect: how to read linalg.generic’s indexing maps and iterator types, and lower it to…

[RFC] DWARF addresses for discarded, overridden weak, and ICF-folded definitions

Summary In the review of #226625, David Blaikie asked whether unified handling of invalid addresses and their derived ranges could replace both that patch and #230469. For residual ranges from discarded code, unified filtering can replace #230469’s CU-only check; I plan to develop that patch across CU indices, DIE ranges, and line tables. ICF presents a separate case: several retained line sequences cover the same valid code addresses. The experiment in Section 3.1 produces the same GSYM error…

[RFC] Add a freezing memcpy

In Rust we are discussing how to best expose freeze to programmers. We’d like to give them the ability to play tricks with uninitialized memory, and we expect this will also be useful to safely and efficiently expose SIMD operations where some lanes can become poison. Currently, LLVM only has a freeze operation on SSA values. That’s not quite enough for a nice API in Rust, where we’d want to be able to do something similar also for types that are not stored in SSA values, but in alloca or…

LLVM Meetup Berlin – 29 October 2026

On Thursday this week we kick off winter season with a presentation by Stefan Gränitz on LLVM backend plugins. Stefan works as consultant and freelance developer, and he announces the LLVM Meetup in Discourse all the time Earlier this year, LLVM’s plugin interface gained the PreCodeGenCallback hook. It allows us to inject code before the backend pipeline or even replace the entire backend with a custom implementation. In this session we will discuss opportunities and limitations of the feature…

Is the C API (llvm-c) production ready?

A bunch of other posts popped up when I typed in the topic and unfortunately, the answer seems to be a clear no. Particularly this post (more than 10 years old) seems to confirm this. Since I would like to work with the C API, I might be able to contribute. However, I would like to know, what is the plan for the C API? Is it a goal to make the C API production ready and there is just a lack of volunteers? Or (as one might think the post linked above implies) is this a discussion that’s going on…

Defining LLDB formatters inline for C++

After forgetting to update a Python-based LLDB formatter after changing some C++ code for the umpteenth time a few weeks ago, I wanted to see if there was another way. I vaguely knew about the LLDB formatter bytecode and that it was used for Swift’s @DebugDescription, so it seemed plausible to me that something similar could be done for C++. Much to my delight, what I ended up with is a little proof-of-concept header-only constexpr-only library that generates LLDB formatter bytecode and writes…

[RFC] Vendor-Owned Pre-Merge Testing for LLVM PRs

Summary This RFC proposes a mechanism for third-party vendors to run their own pre-merge CI checks against llvm/llvm-project pull requests, using infrastructure the vendor owns and maintains. Checks are triggered on an opt-in basis, run on vendor-owned infrastructure, and report results back to the PR as non-blocking status checks. The initial pilot is AMD dispatching ROCm-specific builds and tests, but the mechanism is intended to be usable by any vendor. Motivation Vendors frequently maintain…

[RFC] Sanitizer instrumentation regions: re-enabling instrumentation inside noinstr functions

TL;DR Add two intrinsics, llvm.sanitizer.instrumentation.begin / .end, and Clang builtins __builtin_sanitizer_instrumentation_begin() / _end(), that delimit a region of an otherwise uninstrumented function in which a sanitizer’s instrumentation is enabled again. The Linux kernel already marks these regions (instrumentation_begin() / instrumentation_end(), validated by objtool); the compiler just can’t see them. KMSAN needs this to stop a class of false positives on the kernel entry paths that…

Should InitializeAllTargets() continue to implicitly initialize target infos?

Hi everyone, While reading llvm/include/llvm/Support/TargetSelect.h, I noticed that InitializeAllTargets() calls InitializeAllTargetInfos() with this comment: File llvm/llvm-project llvm/include/llvm/Support/TargetSelect.h a90507f4b #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo(); #include "llvm/Config/Targets.def" } /// InitializeAllTargets - The main program should call this function if it /// wants access to all available target machines that LLVM is configured to…

My availability during November

I will be away all of November, so don’t wait on me for reviews during that time. This also coincides with my Arm colleagues taking on Buildbot monitoring (FYI: Many Arm Buildbots are now managed by Arm Ltd. (the company)). So please follow the usual procedures to contact them about Buildbot issues. Particularly for LLDB, expect more quick reverts and questions about how the test frameworks work. If you think action was taken too hastily, they will be happy to talk about it. They will be erring…

[RFC] A directive to set the alignment of variables in flang

Summary I propose adding a compiler directive that sets the storage alignment of individual variables: !DIR$ ALIGN(n) :: name-list, plus the Intel-compatible spelling !DIR$ ATTRIBUTES ALIGN : n :: name-list, both mapping to one internal representation. This fills a gap in flang’s alignment story: today there is a 64-byte default for array globals and for heap-allocated allocatable/pointer arrays, but, outside OpenMP’s function-scope ALLOCATE directive, no way for a user to request an alignment…

LLVM Weekly - #669, October 26th 2026

LLVM Weekly - #669, October 26th 2026 If you prefer, you can read the canonical version of this issue at https://llvmweekly.org/issue/669. Welcome to the six hundred and sixty-ninth 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…

Does TBAA metadata impact data-flow analysis of volatile loads/stores under LangRef rules?

I am investigating the exact boundaries between Type-Based Alias Analysis (TBAA) and volatile memory accesses within the LLVM IR optimization pipeline. Specifically, I want to clarify whether TBAA can theoretically alter or break the expected data-flow semantics when two different volatile pointers of incompatible types point to the same physical memory location (type-punning via volatile). According to the LLVM Language Reference (Pointer Aliasing Rules): “LLVM IR does not associate types with…

[RFC] Overflow (goto) handler labels for OverflowBehaviorTypes

This is a follow-up to RFC: Linux Kernel discusses OverflowBehaviorTypes from April. Since then I’ve implemented label-based overflow handlers for __ob_trap types and posted them as a stack of four PRs: #235044 Branch to an __overflow handler label instead of trapping #235045 Do the same for truncation and sign-change checks on conversions #235046 Add __builtin_overflow_goto(expr, label) #235047 Add diagnostics for missing, unreachable, and useless handlers I’d like feedback on the design…

[RFC][OpenMP] Virtual Collapse in OpenMPIRBuilder

Initial related PR: #235822 Introduction OpenMP’s collapse(n) clause applies a loop-associated directive to the first n loops of a canonical nest. Their iterations form a combined logical iteration space, allowing work to be distributed across the nest rather than only its outermost loop. This can expose more parallel work when the outer loop alone has few iterations. The existing flattening-based lowering in OpenMPIRBuilder replaces a rectangular nest with a single loop over a logical index.…

[RFC] Symbolic Predicate Tracking for Enhanced Array Bounds Checking

Component: Clang Static Analyzer (clang/lib/StaticAnalyzer/Checkers) Related checker: security.ArrayBound (ArrayBoundChecker.cpp) 1. Summary This RFC proposes a new alpha checker. It looks for array accesses where the programmer did write a bounds check, but the bound in that check is not sufficient to match the size of the array. int table[16]; int lookup(unsigned idx) { if (idx < 32) // the guard allows indices 0..31 return table[idx]; // but the array holds only 16 elements return -1; }…

New alive2 compiler explorer instance

Hi folks- I’ve setup a compiler explorer instance for making Alive2 available to the LLVM community, using a machine graciously provided by Google: http://34.171.68.31/ Once we’re happy with this new setup, I plan to point alive2.llvm.org to this new machine, and then I’ll retire the old one. If a few of you have time to go to the new site and kick the tires, I’d appreciate it. Probably the most important thing is that old shortlinks still work (I’ve done some spot-checking and all seems good).…

Value Bounds on min(max(x, a), b)

Currently, ValueBoundsOpInterface can’t derive a <= min(max(x, b), b) <= b, and adding such a support requires what looks like a hack. This means that torch.clamp isn’t expressible in analysable MLIR. For example %zero = arith.constant 0 : index %size = tensor.dim %tensor, %zero : tensor<?xi32> %nonnegative = arith.maxsi %bound, %zero : index %res = arith.minsi %nonnegative, %size : index ValueBoundsOpInterface derives %res <= %nonnegative and %res <= %size, but no lower bound on %res. This is…