User Guides¶
NOTE: If you are a user who is only interested in using an LLVM-based compiler, you should look into Clang instead. The documentation here is intended for users who have a need to work with the intermediate LLVM representation.
Clang¶
- How To Build On ARM
 - Notes on building and testing LLVM/Clang on ARM.
 - How To Build Clang and LLVM with Profile-Guided Optimizations
 - Notes on building LLVM/Clang with PGO.
 - How To Cross-Compile Clang/LLVM using Clang/LLVM
 - Notes on cross-building and testing LLVM/Clang.
 - How to build the C, C++, ObjC, and ObjC++ front end
 - Instructions for building the clang front-end from source.
 - LLVM Code Coverage Mapping Format
 - This describes the format and encoding used for LLVM’s code coverage mapping.
 - Control Flow Verification Tool Design Document
 - A description of the verification tool for Control Flow Integrity.
 
LLVM Builds and Distributions¶
- Building a Distribution of LLVM
 - A best-practices guide for using LLVM’s CMake build system to package and distribute LLVM-based tools.
 - Building LLVM with CMake
 - An addendum to the main Getting Started guide for those using the CMake build system.
 - A guide to Dockerfiles for building LLVM
 - A reference for using Dockerfiles provided with LLVM.
 - Support Library
 - This document describes the LLVM Support Library (
lib/Support) and how to keep LLVM source code portable. - Advanced Build Configurations
 - This document describes more advanced build configurations.
 
Optimizations¶
- Writing an LLVM Pass
 - Information on how to write LLVM transformations and analyses.
 - LLVM’s Analysis and Transform Passes
 - A list of optimizations and analyses implemented in LLVM.
 - Stack Safety Analysis
 - This document describes the design of the stack safety analysis of local variables.
 - MergeFunctions pass, how it works
 - Describes functions merging optimization.
 - LLVM Alias Analysis Infrastructure
 - Information on how to write a new alias analysis implementation or how to use existing analyses.
 - MemorySSA
 - Information about the MemorySSA utility in LLVM, as well as how to use it.
 - LLVM Loop Terminology (and Canonical Forms)
 - A document describing Loops and associated terms as used in LLVM.
 - Auto-Vectorization in LLVM
 - This document describes the current status of vectorization in LLVM.
 - 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.
 - Remarks
 - A reference on the implementation of remarks in LLVM.
 - Source Level Debugging with LLVM
 - This document describes the design and philosophy behind the LLVM source-level debugger.
 
Code Generation¶
- 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.
 - TableGen
 - Describes the TableGen tool, which is used heavily by the LLVM code generator.
 
JIT¶
- MCJIT Design and Implementation
 - Describes the inner workings of MCJIT execution engine.
 - Debugging JIT-ed Code With GDB
 - How to debug JITed code with GDB.
 
How to debug JITed code with GDB.
Additional Topics¶
- CommandLine 2.0 Library Manual
 - Provides information on using the command line parsing library.
 - Extending LLVM: Adding instructions, intrinsics, types, etc.
 - Look here to see how to add instructions and intrinsics to LLVM.
 - How To Add A Constrained Floating-Point Intrinsic
 - Gives the steps necessary when adding a new constrained math intrinsic to LLVM.
 - How to Cross Compile Compiler-rt Builtins For Arm
 - Notes on cross-building and testing the compiler-rt builtins for Arm.
 - 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.
 - Compiling CUDA with clang
 - LLVM support for CUDA.
 - 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.
 - DWARF Proposal For Heterogeneous Debugging
 - This document describes a DWARF proposal to support heterogeneous debugging for targets such as the AMDGPU backend.
 
