Bookmarkscstheorycompilersllvm

Bookmarks

An MLIR Dialect for Distributed Heterogeneous Computing

Welcome to the home page of the 46th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2025)! PLDI is the premier forum in the field of programming languages and programming systems research, covering the areas of design, implementation, theory, applications, and performance. PLDI 2025 will be held in-person at the Westin Josun Seoul in Seoul, South Korea. The main PLDI conference will be held Wednesday, 18 June through Friday, 20 June. Workshops and tutorials were held on Monday, 16 June and Tuesday, 17 June. PLDI 2025 Travel Guide Nuno Lopes has kindly writte ...

Notes/Primer on Clang Compiler Frontend (1) : Introduction and Architecture

Notes/Primer on Clang Compiler Frontend: Introduction and Architecture These are my notes on chapters 1 & 2 of the Clang Compiler Frontend by Ivan Murashko. The book is focused on teaching the fundamentals of LLVM to C++ engineers who are interested in learning about compilers to optimize their daily workflow by enhancing their code quality and overall development process. (I’ve referened this book extensively, and a lot of the snippets here are from this book.

Tutorials

Multi-Level IR Compiler Framework

Tilde, my LLVM alternative

I'm Yasser and I've made it my mission to produce an alternative to LLVM, the current king of compiler backend libraries.

How LLVM Optimizes a Function

In some compilers the IR format remains fixed throughout the optimization pipeline, in others the format or semantics change.

How to Compile Your Language

The guide also covers how to create a platform-specific executable with the help of the LLVM compiler infrastructure, which all of the previously mentioned languages use for the same purpose.

Will I be able to access proprietary platform APIs (e.g. Android / iOS)?

The kind of binary format being considered for WebAssembly can be natively decoded much faster than JavaScript can be parsed (experiments show more than 20× faster).

The future of Clang-based tooling

By Peter Goodman Clang is a marvelous compiler; it’s a compiler’s compiler! But it isn’t a toolsmith’s compiler. As a toolsmith, my ideal compiler would be an open book, allowing me to get to…

QBE vs LLVM

QBE and LLVM are both compiler backends, but QBE is a smaller, more accessible project aimed at amateur language designers. While LLVM is feature-rich and complex, QBE focuses on simplicity and efficiency, making it easier to use for quick projects. QBE provides straightforward operations and a cleaner intermediate language, reducing the complexity often found in LLVM.

Learning LLVM (Part-1) - Writing a simple LLVM pass

This text introduces learning about LLVM and writing LLVM passes, which are used for transforming or analyzing a program's intermediate representation. LLVM offers a versatile compiler infrastructure with modules like the frontend, middle-end, and backend for optimizing and generating machine-specific code. By understanding LLVM concepts and pass managers, developers can create efficient passes for tasks like performance optimization and code analysis.

Manually linking Rust binaries to support out-of-tree LLVM passes

LLVM is a compiler infrastructure used by frontends like rustc to generate machine code. To add custom LLVM passes to a Rust binary, extra flags can be used during compilation to produce LLVM-IR and then link the binary properly using LLVM tools. By understanding how Rust's static libraries work and leveraging cargo for dependency management, custom LLVM passes can be integrated into Rust binaries efficiently.

A Gentle Introduction to LLVM IR

Learning LLVM IR can be beneficial for generalist working programmers to understand what their compiler is doing to create highly optimized code. LLVM IR is well-documented and can be treated as a slightly weird programming language. It is strongly typed and requires explicit type annotations. LLVM IR is a static single assignment form (SSA) IR and has properties that make optimizations simpler to write. It supports control flow operations, arithmetic instructions for different types, and memory operations. There are also LLVM intrinsics available for specific functions. However, some parts of LLVM's semantics, such as undefined behavior and pointer provenance, can be challenging to navigate.

Subcategories