Subsystem Documentation

For API clients and LLVM developers.

Writing an LLVM Pass
Information on how to write LLVM transformations and analyses.
Writing an LLVM Backend
Information on how to write LLVM backends for machine targets.
The LLVM Target-Independent Code Generator
The design and implementation of the LLVM code generator. Useful if you are working on retargetting LLVM to a new architecture, designing a new codegen pass, or enhancing existing components.
Machine IR (MIR) Format Reference Manual
A reference manual for the MIR serialization format, which is used to test LLVM’s code generation passes.
Describes the TableGen tool, which is used heavily by the LLVM code generator.
LLVM Alias Analysis Infrastructure
Information on how to write a new alias analysis implementation or how to use existing analyses.
Information about the MemorySSA utility in LLVM, as well as how to use it.
Garbage Collection with LLVM
The interfaces source-language compilers should use for compiling GC’d programs.
Source Level Debugging with LLVM
This document describes the design and philosophy behind the LLVM source-level debugger.
Auto-Vectorization in LLVM
This document describes the current status of vectorization in LLVM.
Exception Handling in LLVM
This document describes the design and implementation of exception handling in LLVM.
How To Add A Constrained Floating-Point Intrinsic
Gives the steps necessary when adding a new constrained math intrinsic to LLVM.
LLVM bugpoint tool: design and usage
Automatic bug finder and test-case reducer description and usage information.
Bugpoint Redesign
Design doc for a redesign of the Bugpoint tool.
LLVM Bitcode File Format
This describes the file format and encoding used for LLVM “bc” files.
Support Library
This document describes the LLVM Support Library (lib/Support) and how to keep LLVM source code portable
LLVM Link Time Optimization: Design and Implementation
This document describes the interface between LLVM intermodular optimizer and the linker and its design
The LLVM gold plugin
How to build your programs with link-time optimization on Linux.
Debugging JIT-ed Code With GDB
How to debug JITed code with GDB.
MCJIT Design and Implementation
Describes the inner workings of MCJIT execution engine.
ORC Design and Implementation
Describes the design and implementation of the ORC APIs, including some usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
LLVM Branch Weight Metadata
Provides information about Branch Prediction Information.
LLVM Block Frequency Terminology
Provides information about terminology used in the BlockFrequencyInfo analysis pass.
Segmented Stacks in LLVM
This document describes segmented stacks and how they are used in LLVM.
LLVM’s Optional Rich Disassembly Output
This document describes the optional rich disassembly output syntax.
How To Use Attributes
Answers some questions about the new Attributes infrastructure.
User Guide for NVPTX Back-end
This document describes using the NVPTX backend to compile GPU kernels.
User Guide for AMDGPU Backend
This document describes using the AMDGPU backend to compile GPU kernels.
Stack maps and patch points in LLVM
LLVM support for mapping instruction addresses to the location of values and allowing code to be patched.
Using ARM NEON instructions in big endian mode
LLVM’s support for generating NEON instructions on big endian ARM targets is somewhat nonintuitive. This document explains the implementation and rationale.
LLVM Code Coverage Mapping Format
This describes the format and encoding used for LLVM’s code coverage mapping.
Garbage Collection Safepoints in LLVM
This describes a set of experimental extensions for garbage collection support.
MergeFunctions pass, how it works
Describes functions merging optimization.
Design and Usage of the InAlloca Attribute
Description of the inalloca argument attribute.
FaultMaps and implicit checks
LLVM support for folding control flow into faulting machine instructions.
Compiling CUDA with clang
LLVM support for CUDA.
Coroutines in LLVM
LLVM support for coroutines.
Global Instruction Selection
This describes the prototype instruction selection replacement, GlobalISel.
XRay Instrumentation
High-level documentation of how to use XRay in LLVM.
Debugging with XRay
An example of how to debug an application with XRay.
The Microsoft PDB File Format
A detailed description of the Microsoft PDB (Program Database) file format.
Control Flow Verification Tool Design Document
A description of the verification tool for Control Flow Integrity.
Speculative Load Hardening
A description of the Speculative Load Hardening mitigation for Spectre v1.
Stack Safety Analysis
This document describes the design of the stack safety analysis of local variables.
LLVM Loop Terminology (and Canonical Forms)
A document describing Loops and associated terms as used in LLVM.