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

Interest in adding DIEnumerator and template parameter debug info to the LLVM dialect?

Hi everyone, I recently fixed a crash in the bytecode writer for DIBasicTypeAttr (#240240). While reading the debug info import and export code I noticed some gaps, and I wanted to ask before writing anything. DebugImporter does not handle llvm::DIEnumerator. When importing an enumeration type, translating each enumerator returns null, so the whole elements list of the composite type is dropped. Template parameters (DITemplateTypeParameter and DITemplateValueParameter) are never imported, and…

Save the Date: 2027 EuroLLVM, April 26-28

Save the date for the 2027 EuroLLVM Developers’ Meeting! It will be held April 26-28 in Porto, Portugal. We are actively seeking proposals for co-located workshops and volunteers for the program committee. Please see below for more information! The EuroLLVM Developers’ Meeting is a bi-annual gathering of the entire LLVM Project community. The conference is organized by the LLVM Foundation and many volunteers within the LLVM community. Developers and users of LLVM, MLIR, Clang, and related…

Compact unwind on ELF round table notes

I didn’t take notes properly, so this will be a bit scattered Attendees: @MaskRay, @petrhosek, a few folks from Nintendo whose names I didn’t get (sorry!), @slinder1, @rnk, @clayborg, @pcc, a few others (again I apologize for the lack of organization on my part here). @jyknight and I spoke briefly afterwards on this topic as well. We spoke about the high-level motivation of .eh_frame unwind info being large and slow to interpret, and @aengelke’s compact unwind proposal to address that. Some…

Turndown of `clangd-ubuntu-clang` build worker

Hi everyone! Unfortunately due to shifts in priorities we can no longer maintain https://lab.llvm.org/buildbot/#/workers/66 reliably which opens up the door to various concerns including but not limited to security. As a result, we’ve decided to turn down the build bot this week. If anyone wants to own the buildbot, relevant docker config lives in buildbot/google/docker/buildbot-clangd-ubuntu-clang deployment config lives in llvm-zorg/buildbot/google/terra…

[RFC][RegAllocGreedy] Repairing missed copy hints in late hint recoloring

PR: [RegAllocGreedy] Improve recoloring of missed copy hints by haddadgeorge · Pull Request #240139 · llvm/llvm-project · GitHub Problem Greedy’s late hint recoloring only considers live ranges in SetOfBrokenHints. A range ends up there only when its first hint is a physical register that was missed, or when its register came from eviction. Copy hints between virtual registers that are simply missed in tryAssign are never revisited, and neither are cases where the hinted register is held by…

[RFC][libc] Portable fixed-point elementary math

Status: request for design feedback. No new implementation or benchmark results are presented. Summary and motivation I propose implementing portable fixed-point elementary functions using integer-only numerical kernels. I am seeking review comments on the scope, architecture, numerical contracts, and suitability for LLVM libc before implementation. Embedded targets without suitable floating-point hardware may benefit from bounded-storage integer kernels. Applications using explicit Q formats…

Reminder: FOSDEM 2027 LLVM & MLIR Devrooms CfP

A gentle reminder, or for those who didn’t see the original posts in the Community category: the FOSDEM 2027 LLVM and MLIR devroom calls for presentations are currently open: FOSDEM 2027 LLVM devroom call for presentations FOSDEM 2027 MLIR devroom call for presentations The submission deadline for both is 22 November. Looking forward to your submissions, and to see you in Brussels next year! / Hans 1 post - 1 participant Read full topic

[RFC][mlir][Linalg][Vector] Fast-math flags on Linalg and Vector ops

Summary Linalg and Vector carry fast-math flags in two ways: Linalg has them on the scalar arith and math ops inside a region body (linalg.generic, linalg.map, linalg.reduce). Named ops such as linalg.matmul and linalg.contract have no flag attribute. Vector has them on three ops that each stand for many scalar operations: vector.reduction, vector.multi_reduction and vector.contract. There is no written rule for how Linalg and Vector transforms treat these flags. Each transform decides on its…

Revisiting LLVM's development practices

Context of this long post The purpose of this post is to document my response to the question @petrhosek asked at the end of the talk LLVM in Safety-Critical Industries: Toward a Shared Qualification Layer Upstream at the 2026 US LLVM Developers’ Meeting. As the recording is not yet available, I cannot quote the exact wording of @petrhosek’s question. However, I recall that it was related to the Quality & Best Practices workstream in the LLVM Qualification WG. He wanted to know what insights we…

[RFC]: Deprecate and remove the `sycl_kernel` and `sycl_special_class` attributes

The sycl_kernel and sycl_special_class attributes were added to Clang during a previous effort to contribute an implementation of the SYCL 2020 specification. They are not, and will not be, used by the current effort. Deprecation and removal is proposed to avoid maintenance and confusion. See [RFC] Remove opencl_global_device and opencl_global_host address space attributes regarding deprecation and removal of other similarly unused attributes contributed by the previous effort. These attributes…

[RFC] An intrinsic to query enabled target features after inlining

Problem Frontends sometimes need to select feature-specific code, taking into consideration the caller’s enabled target features after inlining. I am looking to add this to Rust, and Julia already has a custom pass to provide this functionality: julia/src/llvm-cpufeatures.cpp at master · JuliaLang/julia · GitHub This lets library functions select specialized implementations after inlining, without requiring a frontend-specific LLVM pass. Intrinsic The intrinsic returns 1 if the feature is…

[RFC] Vectorize X86 `cvtss2si` / `cvttss2si` loops

Problem Loops that convert floats with _mm_cvt_ss2si(_mm_set_ss(x)) or _mm_cvtt_ss2si(_mm_set_ss(x)) are never vectorized, although cvtps2dq / cvttps2dq compute the same per-lane result (#239539). Opus uses this pattern for float2int on SSE targets (celt/float_cast.h). #include <xmmintrin.h> static inline int float2int(float x) { return _mm_cvt_ss2si(_mm_set_ss(x)); } void convert(const float *restrict in, int *restrict out, int n) { for (int i = 0; i < n; i++) out[i] = float2int(in[i]); }…

RFC: Dealing with false positive from bugprone-std-namespace-modification

Open issue llvm/llvm-project [clang-tidy] False positive bugprone-std-namespace-modification with constrained partial specializations opened 01:37PM - 04 Nov 26 UTC TedLyngmo clang-tidy false-positive bugprone-std-namespace-modification (also cert-dcl58-cpp) warns on partial speci…alizations of standard library templates that are constrained to program-defined types by a concept or a requires-clause. [namespace.std]/2 allows a program to add a specialization of a standard library class template…

Neuro: a tensor language lowering through linalg to NVVM and ROCDL, looking for feedback on GPU scheduling

I’ve been building Neuro, an ahead-of-time compiled language for AI work, on MLIR 23 and LLVM 23. It’s a small frontend, but it goes through a lot of upstream MLIR, and I’d like advice on the part where it’s slow. Tensors have static shapes in the type, written Tensor<f32, [2, 1]>. The frontend outlines each tensor operation into its own function, and that body is built from linalg, tensor and memref. Scalar code goes straight to LLVM through inkwell. The MLIR side, built with melior, is…

Default Alignment Behavior for COMMON Block Members in Flang

## Summary The Fortran standard leaves the alignment of COMMON block members processor-dependent, and compilers have chosen different defaults. gfortran pads members to their natural alignment, while ifx/ifort and IBM XLF place them sequentially with no padding. The same COMMON block therefore has different member offsets depending on the compiler. Flang has no option to choose between the two layouts. I propose adding gfortran’s `-falign-commons` / `-fno-align-commons` options to Flang, so…

[RFC] Consistent denormal flushing during constant folding

What should the result of fadd(f0x00000001, f0x00000001) be with denormal_fpenv(preservesign)? It has 2 denormal inputs and produces a denormal output. The current implementation is: 0.0 if run on FTZ/FZ-supporting hardware (e.g. x86, Arm, NVPTX) 0.0 if const-folded via ConstantFolding.cpp (e.g. in InstSimplify or InstCombine) f0x00000002if const-folded via SelectionDAG or GlobalISel f0x00000002if const-folded elsewhere at the IR level (e.g. when creating a new BinaryOperator during…

Clarification on supported compilation settings for a custom calloc implementation with full LTO

We are implementing a custom allocator for a firmware/runtime and would like to clarify the supported compilation settings when its implementation participates in full LTO. The reduced case has a wrapper and two consecutive calls, with no intervening free: /* wrapper.c */ void *object_init(void) { return calloc(1, 128); } /* caller.c */ void *a = object_init(); void *b = object_init(); Our calloc implementation uses a private static arena and allocation cursor. For these requests, it returns…

[lld] jemalloc helps some programs and hurts others: can the linker decide statically whether to link it?

Summary Observation: On a SpacemiT K3 (RISC-V) board, replacing glibc malloc with jemalloc 5.2.1 for SPEC CPU2006 makes 18 of the 29 benchmarks faster and 11 slower. The overall gain is small (SPECint2006 1.0038, SPECfp2006 1.0062), and 403.gcc takes about 29% longer. Cause: For every basic block it processes, 403.gcc allocates a large array with calloc and frees it when done. When jemalloc reuses this memory, its default configuration zeroes it with madvise(MADV_DONTNEED) instead of memset, so…

[RFC] Phasing out the `-Wno-unused-parameter` suppression when building

Background LLVM’s shared warning configuration HandleLLVMOptions.cmake appends -Wno-unused-parameter for GCC-compatible compilers and clang-cl when warnings are enabled; the top-level .clang-tidy also explicitly excludes misc-unused-parameters. After removing that option, I ran a full build of the default target (Debug, assertions enabled, X86 backend; projects clang, lld, lldb, mlir; the libc runtime). The following data is tallied from the build log by an LLM: Component Source locations…

Help wanted from library maintainers: declaring cl:: options in TableGen

Following RFC [RFC] Declare library command line options in TableGen, one struct per library, cl::opt/cl::list/cl::alias/… declarations in llvm/lib have dropped from 2847 on release/23.x to 1644 on main. I’d like to get most of the rest done before the LLVM 24 branch in Jan 2027 (?). @aengelke @nikic @rnk What’s left is mostly straightforward but large: CodeGen, Hexagon, Transforms/Utils, PowerPC, ARM, and the smaller backends. AArch64, X86, and RISCV are good references for a backend. If you…

[RFC] Allow commutative, involution, and idempotent to be conditional

Currently commutative, involution, and idempotent are unconditional. In our dialect we allow operator overloading. For example with addition, depending on the types involved, the operation may or may not be commutative. This forces us to introduce an operation per overload or introduce generic operations for each allowable combination of commutative, involution, and idempotent. I wrote Allow commutative, involution, and idempotent to be conditional · jcking/llvm-project@61560f2 · GitHub which…

[RFC] an opt-in GNU ld-inspired layout and its performance on RISC-V

Hi all, We have been investigating the impact of ELF section and segment layout on runtime performance on a SpacemiT K3 (X100) RISC-V system. Based on LLVM 23.1.0, we have implemented an opt-in experimental layout in lld, inspired by some of GNU ld’s layout choices. This layout is enabled through an option; when the option is not specified, lld retains its existing default layout. The main changes are: 1. Place executable sections such as `.text` before read-only non-executable sections such as…

Loop Transformations Round Table Notes - LLVM US Dev Meet 2026

Round table was hosted by me. It was attended by at least 20 members. Here are some meeting notes. Attendees - please append in case I missed anything. 1. Loop interchange: We enabled the pass by default for both Clang and Flang O3 pipeline. The community is now enhancing the pass to handle more cases like demonstrated in swim/CPU 2000 benchmark. The patch is pretty big to review so we need sometime for review. 2. Loop Fusion: In the last few weeks, we have fixed several crashes in loop fusion.…

2026 US Dev Meeting LLVM-libc roundtable notes

Thanks to everyone who attended! These notes were taken by Brooks Moses, so big thanks to him for helping out! Faraz Shahbazker (MediaTek): Semi-hosting? Would this be an abstraction layer? Michael Jones: Yes, the idea is that this would be an abstraction layer on top of hooks that the vendor can implement. ARM is looking into using llvm-libc for semihosting. FS: Would LLVM libc replace musl, or glibc, or…? MJ: It’s designed to be modular so it can do many things. At Google we’re replacing…

[RFC] New Checker to Clang Static Analyzer

Hi LLVM Project, I would like to propose a new Checker, called SegmFaultBugChecker: [Proposed Idea] Warning: A brief message alerting the User to a potential segmentation fault. Iteration: This checker iterates over each function call (e.g., clear_memory(0xFFFF80000000,NULL)) and verifies that none of the passed parameters are null. [Code Example] // A Bare-Metal Code in C void kprintf(const char *str) { unsigned short *VideoMemory = (unsigned short*)0xB8000; for (int i = 0; str[i] != '\0';…

RFC: PR limits for non-committers

Hey folks, we’ve had a lot of conversations about AI and LLMs and how they are changing the open source development landscape, in Nikita’s RFC,in the contributor policy refresh RFC, and in person at the US LLVM developer meeting. It’s very clear that contributors, and especially maintainers, are tired of dealing with the overload of PRs, and we should act quickly to adjust the policy. Therefore, I am proposing that we enable pull request limits for contributors without write access to our…

Classic flang call

There is still a reference to the classic flang call in Flang’s Getting Involved page. However, the last entry in the agenda document for that meeting is from February 2025. Does anyone know if that meeting still takes place? If not, I will open a PR to remove this from flang’s documentation. 1 post - 1 participant Read full topic