L
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…
L
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…
L
1 post - 1 participant Read full topic
L
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]); }…
L
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…
L
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…
L
## 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…
L
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…
L
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…
L
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…
L
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…
L
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…
L
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…
L
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…
L
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.…
L
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…
L
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';…
L
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…
L
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
L
We’ll skip the meeting tomorrow (Thu 5th November) as there aren’t a lot of topics queued up and a bunch of the regulars met last week at the US dev meeting already. As always, feel free to queue up items in the doc. 1 post - 1 participant Read full topic
L
FREEZE handling - stalled by a number of PRs – Long standing regressions preventing them landing (e.g. RISCV64 sllw/sraw nodes) – When can we just fold FREEZE(LOAD(CONSTANT_POOL)) → LOAD(CONSTANT_POOL) – DAG still CSEs FREEZE(POISON/UNDEF) nodes of the same type - can affect isel Topological Sorting – We now have the ability to enable this at command line and per-target – Not just regressions - still have crashes in some tests – Sam Elliot and Craig Topper said they’d take a look at narrowing…
L
Rough notes from the roundtable discussing how we can improve InstructionCost to better model code sequences and share more cost data with backend scheduler models. The focus was mainly on Vectorizers/VectorCombine, but other passes need better cost estimates as well. Are the TTI::getCost methods actually any good for how we use them? – No way to describe Instruction sequences, how they will combine (e.g. load+extend, compares sunk into eflags, X86addsub, value tracking) – Please can we get rid…
L
Apologies for my rough notes, but these are the topics that arose at the round table. Gather Costs – Is this the cause of the SPEC Prefer512Bit regression in [X86] Remove TuningPrefer256Bit from x86-64-v4 · Issue #231086 · llvm/llvm-project · GitHub? – Znver4 gather cost PRs still need reviewing but this is happening on all AVX512 targets – Fix TTI isLegal check to allow AVX2 to use gathers for CodeSize builds Cleanup CodeGen – X86ISelLowering.cpp recently went over 64K LoC – Many folds/tests…
L
With [Flang] KIND De-templatization by Meinersbur · Pull Request #216960 · llvm/llvm-project · GitHub landed, some of the type aliases do not make sense anymore, for instance using Int4 = Type<TypeCategory::Integer>; using Int8 = Type<TypeCategory::Integer>; I created [Flang][NFC] Remove Type convenience aliases by Meinersbur · Pull Request #238270 · llvm/llvm-project · GitHub to clean them up. It currently does this by deleting such aliases and using Type<TypeCategory::X> directly instead. The…
L
Background LLVM’s AI Tool Use Policy already prohibits using AI to fix good first issue tasks, a restriction introduced in PR #172515: AI tools must not be used to fix GitHub issues labelled good first issue. These issues are generally not urgent, and are intended to be learning opportunities for new contributors to get familiar with the codebase. Whether you are a newcomer or not, fully automating the process of fixing this issue squanders the learning opportunity and doesn’t add much value to…
L
We’re pleased to collaborating with the University of Toronto Computer Science Student Union on hosting the next Toronto LLVM Meetup! Please join us for a pair of technical talks, followed by socializing with fellow LLVM enthusiasts! Location Bahen Centre of Information Technology 40 St George St, Toronto, ON M5S 2E4, Canada · Toronto, ON Room BA3200 Agenda 6:30 - 7:00 pm Doors open, socializing 7:00 – 7:30 pm Presentation “Getting started with LLVM (it’s not that scary!)” - by Ayokunle Amodu…
L
We are happy to announce that LLVM 23.1.5 is now released! This includes the main LLVM project, and its subprojects including clang, lld, libc++, and MLIR. Huge thanks to everyone that contributed, reviewed, provided support and in any other way contributed to this release! Download Find sources on GitHub. A note on binaries Official binaries will not be available right away. They will be provided later. Third-party binaries will be posted to the following forum thread. Note that these binaries…
L
Hi everyone, I’d like to share LLVM Vulkan 1.1, an open-source project exploring whether standard Vulkan compute shaders can be used as an acceleration layer for LLVM optimization passes without compromising LLVM’s host semantic authority. Project site: LLVM Vulkan — Portable bulk-compute API and scoped LLVM passes GitHub: GitHub - HECer/llvm-vulkan: Portable Vulkan bulk-compute API and scoped LLVM passes, with reproducible CPU/GPU benchmarks and release packages. · GitHub Release 1.1.0:…
L
These are not listed in any particular order of importance and may include notes from discussions that happened over the two days of the conference, not just at the roundtable Call-related topics Keeping things on the biweekly meeting agenda, even if no one comments on them at the time, is helpful for visibility of the issue and ultimately worth continuing to do The old Monday technical call still needs to be removed from the official LLVM calendar Does having the one biweekly call and the…
L
TL;DR: Adds -fsanitize=daddress as a new address sanitizer for AMD GPUs. Provides fast, low-overhead address sanitization for all AMD GPUs without shadow memory. An address carries its own metadata by virtue of where it was placed in virtual memory. Overhead instead scales per-allocation rather than per-granule. Compared to existing GPU implementations, DASan is several times faster, has less memory overhead, and works on all GPUs. Measured overhead was 1.35x on HeCBench and several real faults…