💫In any case, the issues detected by the analyzer have since been fixed in the LLVM repository. Our devs submitted a bug-fix commit, linked below, and the LLVM contributors did everything quickly (great job).
Stay tuned for more stories about bugs in real projects.
#programming #dev #llvm #coding
A few months ago, our analyzer found something in LLVM 21.
The PVS-Studio warning for the code below was: V557 Array overrun is possible. The value of 'regIdx' index could reach 31. VEAsmParser.cpp 696
What happens here?
#Coding #Debugging #llvm #FindError
すごい / LLVMに対する32ビット定数除算の改善
#LLVM #algorithm
A program in my programming language showing pointer allocation and illegal freeing: ``` fn bad(ptr: &u32) { free ptr; } fn main() { let x = new u32; free x; let i = 10; let p = &i; free p; } ```
The error messages from compiling the program: ``` Error: Cannot free a pointer with lifetime `Param` at src\main\resources\examples\memory.os:2:5 2 | free ptr; | ^^^^^^^^^ Error: Cannot free a pointer with lifetime `Stack` at src\main\resources\examples\memory.os:11:5 11 | free p; | ^^^^^^^ ```
Starting on the memory management for my language. Nothing fancy but just a few more guard rails than C. Every pointer has an "origin": Stack, Param, Heap, or Global. Only Heap can be freed, and Stack can't be returned from functions.
Maybe this will cause problems but we'll see!
#compiler #llvm
literally have seen Lattner on the "inevitability" train
#llvm
A picture of 3 separate files in my programming language that form a dependency chain. main.os imports io.os and math.os, math.os imports io.os. main.os: ``` import "math.os"; import "io.os"; fn main() { io::print_msg("Hello from main.os!"); var v = math::Vec(1.0, 2.0); println(math::dot(v, v)); var x = math::pow(2.0, 3); println(x); math::greet(); } ``` math.os: ``` import "io.os"; struct Vec(x: f32, y: f32) { fn dot(v1: Vec, v2: Vec): f32 { return v1.x * v2.x + v1.y * v2.y; } } fn pow(x: f32, p: u32): f32 { for _ in 1..p x = x * x; return x; } fn greet() { io::print_msg("Hello from math.os!"); } ``` io.os: ``` fn print_msg(msg: string) { println(msg); } ```
The output of the program: ``` Hello from main.os! 5.000000 16.000000 Hello from math.os! ```
I managed to implement a somewhat halfway decent module system. I'm not thrilled that the import needs the relative path but it'll do for now. Plus it handles the same file being imported multiple times across the compilation graph 😌
#compiler #llvm
compilers are amazing. Thank you, compiler people
code.vinyl-cache.org/vinyl-cache/vinyl-cache/...
#gcc #clang #llvm
#LLVM 22.1.0 release is a technically dense update that touches nearly every layer of the toolchain medium.com/p/llvm-22-1-...
LLVM 22.1 cross-platform compiler system is out with major backend upgrades, LLDB improvements, and new ThinLTO features.
linuxiac.com/llvm-22-1-re...
#LLVM #OpenSource
A program in my programming language showing string slicing: ``` fn main() { var s: string = "Hello from osmium!"; println(s); println(s[6..=10]); var sl = s[8..17]; println(sl); for c in s[0..5] { print(c); print(' '); } } ```
The output of the program: ``` Hello from osmium! from om osmium H e l l o ```
Added strings to my language, since they're just backed by a slice of u8's all the regular slice operations just worked out of the box
Again nothing real languages don't do but it's so satisfying seeing it work!
#compiler #llvm
Exciting times for the HPC community! The latest #LLVM merge (23) sets the new unified offload driver as the default for AMD HIP. Read more:👉 tinyurl.com/33dmcp6v
HPC++: An LLVM-Based Automatic Parallelization Framework with Heterogeneous CPU–GPU Execution
#OpenCL #HPC #LLVM
hgpu.org?p=30590
HPC++: An LLVM-Based Automatic Parallelization Framework with Heterogeneous CPU–GPU Execution We present HPC++, an automatic parallelization framework that transforms sequential C++ programs into...
#Computer #science #OpenCL #paper #HPC #LLVM
Origin | Interest | Match
“The Claude C Compiler: What It Reveals About The Future Of Software”, Chris Lattner (www.modular.com/blog/the-cla...).
On HN: news.ycombinator.com/item?id=4709... & news.ycombinator.com/item?id=4700...
On Lobsters: lobste.rs/s/wk6rjh/cla...
#LLVM #Compilers #AI #C #ClaudeCCompiler #ClaudeCode
Fascinating movement in the #AMDGPU #LLVM back-end. The GFX1170 ("RDNA 4m") target is being retrofitted with RDNA4's WMMA instructions for #AI while stripping out legacy DX10 bits. Read more: 👉 tinyurl.com/3jttkn2z
#Intel officially sunsets its open-source Quantum Passes project. The GitHub repo is now archived, halting development on key #LLVM compiler tools for their quantum SDK. Read more: 👉 tinyurl.com/3k6dadxm
Interestingly, when building Pocl with the option to statically link against LLVM 18, the crash can be reproduced by simply running `clinfo -l` (which is the least-intrusive OpenCL-using command you can run, basiclaly) and the error is caused by the good old
: CommandLine Error: Option […]
Interestingly, the segfault seems to be from clang::DiagonsticOptions from llvm-21, so this is likely one of the neverending series of issues that arise when mixing #LLVM versions that has plagued #FLOSS #OpenCL ICDs since forever. I thought we had finally gotten rid of these issues, but […]
Why is there no std::move_only_function in libc++? 😭😭😭
I know there is a pull request since 2024, but I have no idea when or even if it will ever get merged.
I just wanna be able to finally use import std; with libc++ in all my projects. #C++ #cpp #LLVM #libc++ #import-std
Writing an Optimizing Tensor Compiler from Scratch...
#LLVM #Unity #NumPy
Read more on Hackaday: postreads.co/feed-item/50835/click
This is really cool.
fosdem.org/2026/schedule/event/F8SD...
https://youtu.be/kRidW7DMxzU
#bazel #llvm #fosdem #opensource
Just analyzed the new #AMDGPU GFX13 commit in the #LLVM 23 Git tree. This initial target for the presumed RDNA5 architecture is a classic "scaffolding" commit—light on new features but heavy on long-term significance. Read more: 👉 tinyurl.com/3r2axsu8
One of the nice parts of #llvm is that often times you'll find yourself needing to do some sort of non-trivial analysis, but usually there's already a pass for it.
Here's how you can reuse a block frequency analysis to make a chess engine 7% faster on #riscv: lukelau.me/2026/01/26/c...
Todays update let me generate the code shaping separately from the glyph atlas. I can draw tens of thousands of lines of unique strings in ms!
Next I want to support allographic languages and ligatures, like Arabic's غغغ
(google fonts for comparison)
#clang #llvm #emscripten #gamedev #webdev
Does anyone know if it is possible to create an LLVM MachinePass without compiling LLVM from scratch (i.e. as a plugin)? #LLVM
更新されたよ、見に来てね!→ #LLVM が決断! #AI #コード生成 の未来 #Linux と#Snapdragon の蜜月 1月21日(水) #Linux #News #development
This week I integrated kb_text_shape.h to my project and drew a complete string with proper text shaping using instancing. It was quite a bit trickier than I expected because WebGL doesn't support texture buffers, and I had to revert to using samplers.
#clang #llvm #emscripten #gamedev #webdev