This repo includes LLVM-related projects, websites, docs, and other resources. Only well-maintained resources are included; PRs are welcome. This README.md itself mostly records LLVM backend (as well as mixed) resources; for Clang-specific ones, please check Clang.md in this repo.
Websites(references)
- ๐ http://llvm.org/, and its doxygen docs
- ๐ https://llvm.org/devmtg/ - LLVM Developers' Meeting and other events
- ๐น 2023
- ๐ http://blog.llvm.org/ - official blog
- ๐ discourse forum
- ๐ llvm-commits archives
- ๐ llvm-bugs archives
- ๐ LLVMProj @ YouTube - official account, including LLVM devmeeting, EuroLLVM, etc
- ๐ Open Projects
- ๐ LLVM Community events calendar
- llvm-weekly and its Mastodon page by Alex Bradbury
- The Architecture of Open Source Applications - LLVM
- Eli Bendersky's website
- ChenWj's LLVM Wiki(Traditional Chinese)
- An Unofficial LLVM Website
- LLVM @ StackOverflow
- LLVM @ reddit
- GitHub LLVM topic
- LLVM documentation in hdoc
ELLCC - Online LLVM Demo Page
Tutorials/Documentation (reference)
- ๐ LLVM Tutorials - a list of tutorials
- ๐ LLVM Language Reference Manual - detailed docs for LLVM IR/Bitcode
- ๐ LLVM Bitcode File Format
- ๐ The Often Misunderstood GEP Instruction
- ๐ Opaque Pointers - Opaque pointer that was introduced in LLVM14 and fully deprecates typed pointers in LLVM17
- A Gentle Introduction to LLVM IR, with a Chinese translation version
- PSA: Instruction-constructors changing to iterator-only insertion - VSCode LLVM Compiler Explorer
- ๐ LLVM Programmerโs Manual - how to develop using LLVM infrastructure
- ๐ LLVM Coding Standards
- ๐ LLVM Developer Policy
- ๐ LLVM Style RTTI
- ๐ Source Level Debugging
- ๐ Create A Project
- ๐ Exception Handling in LLVM
- ๐
- ๐น A Tour of ADT - the LLVM Developer's Toolbox
- ๐ CommandLine 2.0 Library Manual - LLVM's CLI option parser library, used by all LLVM CLI tools etc
- ๐ Getting Started with the LLVM System - LLVM project's build, configurations, directory layouts etc
- ๐ LLVMโs Analysis and Transform Passes
- ๐ Using the New Pass Manager - LLVM's new pass manager for optimization (both CLI and API changed)
- ๐ Writing an LLVM Pass
- ๐ LLVM Alias Analysis Infrastructure
- Tracing Memory Access With an LLVM Pass - a blog post details how to implement an LLVM Pass that allows for tracing memory access
- ๐ LLVM Testing Infrastructure Guide
- ๐ Writing an LLVM Backend
- ๐ LLVM Remarks - emit diagnostics describing whether an optimization is performed/missed
- ๐ LLVM FAQ - Frequently Asked Questions
- Sanitizers - AddressSanitizer, MemorySanitizer, ThreadSanitizer, UndefinedBehaviorSanitizer, LeakSanitizer, etc
- Tutorial: Creating an LLVM Backend for the Cpu0 Architecture
- LLVM-Tutor - A collection of out-of-tree LLVM passes for teaching and learning
- learning-llvm - a project for learning about llvm
- LLVM-Pass-Analysis-Collection - A Collection of LLVM Pass for Program Analysis
- srg-llvm-pass-tutorial - A tutorial about llvm passes from Software reliability group
- ๐ Get Started with the LLVM C API
- lahiri-phdworks/LLVM-Examples - LLVM Repository and Code samples. LLVM Passes and quick bytes.
- wuzhanglin/llvm-IR-examples - Some examples for using LLVM to generate IR
- llvm-ir-tutorial (in Chinese)
- ๐น LLVM Tutorial Walkthrough -- Toby Ho's tutorial
- ๐น Introduction to the Low-Level Virtual Machine (LLVM) - UFMG's Compilers Lab's tutorial
- ๐น Understanding Compiler Optimization - Chandler Carruth's Opening Keynote Meeting C++ 2015
- ๐ Tools for Learning LLVM TableGen - tutorial by David Spickett about LLVM's TableGen
- http://llvm.org/pubs/
- LLVM @ Google Scholar
- LLVM @ ACM-DL
- LLVM @ IEEEXplore
- LLVM @ DBLP
- ๐ Learn LLVM 12 - good to start with
- ๐ Learn LLVM 17 Second Edition
- ๐ Getting Started with LLVM Core Libraries, also available on ACM library
- ๐ LLVM Cookbook
- ๐ LLVM Essentials
- ๐ LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries
- ๐ Engineering LLVM Backend
Official Tools/Libraries (reference)
- Core Utilities
- opt - LLVM optimizer, for LLVM analysis and transformation passes, works on
.ll
or.bc
files - lli - Directly execute/intepreter programs from LLVM bitcode, running on
.ll
or.bc
files - llvm-dis - LLVM disassembler, from
.bc
to.ll
- llvm-as - LLVM assembler, from
.ll
to.bc
- llvm-link - LLVM bitcode linker, merge multiple
.bc
s/.ll
s into one - llvm-dwarfdump - Print contents of DWARF sections,
llvm-dwarfdump -a main.o
- llvm-config - Print LLVM compilation options, e.g.,
llvm-config --includedir
- llvm-extract - Extract functions from an LLVM module
- llvm-bcanalyzer - LLVM bitcode analyzer,
llvm-bcanalyzer main.bc
- llvm-objdump - LLVM's objdump,
llvm-objdump -a main.o
- llvm-nm - LLVM's nm
- llvm-readelf - LLVM's readelf,
llvm-readelf -a main.o
- llvm-readobj - LLVM object reader,
llvm-readobj --all main.o
- llvm-diff - LLVM structural "diff"
- llc - LLVM static compiler, compile LLVM IR to native assembly,
llc main.ll -o main.s
- llvm-ar(llvm-ranlib) - LLVM archiver
- llvm-mca - LLVM Machine Code Analyzer
- lit - LLVM Integrated Tester, for testing purpose during development
- opt - LLVM optimizer, for LLVM analysis and transformation passes, works on
- libc++ - LLVM's implementation of C++ standard library
- libc++abi - LLVM's C++ ABI library that provides an implementation of the library portion of the Itanium C++ ABI
- Compiler-RT - runtime libraries, including sanitizers, profiling utilities, etc
- MLIR - Multi-Level Intermediate Representation
- ๐ MLIR News - MLIR News issue on discourse
- ๐
- llvm/Torch-LLVM - first class support from the PyTorch ecosystem to the MLIR ecosystem
- llvm/Polygeist - C/C++ frontend for MLIR
- j2kun/mlir-tutorial - a series of articles on the MLIR framework for building compilers
- Lewuathe/mlir-hello - minimal Hello-World example of MLIR
- melior - The rustic MLIR bindings in Rust; see also introduction blog post
- Sparsifier - Google MLIR sparsifier
- intel/mlir-extensions - Intelยฎ Extension for MLIR
- MLIR Workshop @ EuroLLVM 2024 -- topics with slides available, also notes about MLIR at round table
- ๐น MLIR Is Not an ML Compiler, and Other Common Misconceptions
- libfuzzer - a library for coverage-guided fuzz testing
- LLD - LLVM's integrated linker, similar to GNU ld and gold linker
- relevant: LLVM Gold Linker plugin
- LLDB - LLVM's LLDB Debugger
- LLVM's libunwind - an implementation of the interface defined by the HP libunwind project
- Polly - LLVM Framework for High-Level Loop and Data-Locality Optimizations
- OpenMP in LLVM
- OpenCL C in LLVM - open source, BSD/MIT dual licensed implementation of the library requirements of the OpenCL C programming language
- BOLT - a post-link optimizer developed to speed up large applications
Unofficial Tools/Libraries (reference)
- SVF-tools - Pointer Analysis and Program Dependence Analysis for C and C++ Programs
- smack - SMACK Software Verifier and Verification Toolchain
- Phasar - A LLVM-based static analysis framework
- Infer - Facebook's static analysis framework; C/C++/objc is based on LLVM/Clang
- mstorsjo/llvm-mingw - An LLVM/Clang/LLD based mingw-w64 toolchain
- microsoft/llvm-mctoll - statically (AOT) translates (or raises) binaries to LLVM IR
- mcsema - An x86 to LLVM IR decompiler
- whole-program-llvm - A wrapper script to build whole-program LLVM bitcode files; its go port gllvm
- ollvm - code obfuscation based on LLVM4.0
- S2E - Selective Symbolic Execution (use KLEE as symbolic executor)
- RetDec - a retargetable machine-code decompiler based on LLVM
- capstone - Disassembler based on the MC component of the LLVM compiler infrastructure
- DWGrep - A tool for querying Dwarf (debuginfo) graphs
- Emscripten - An LLVM-to-JavaScript Compiler
- cling - The cling C++ interpreter (1.0 has been released)
- remill - Library for lifting machine code to LLVM bitcode
- llvm2cpg - LLVM meets Code Property Graphs
- QBDI - A Dynamic Binary Instrumentation framework based on LLVM
- circt - Circuit IR Compilers and Tools
- American fuzzy lop (AFL) - LLVM mode for instrumentation
- klee - Symbolic Virtual Machine
- IKOS - Static analyzer for C/C++ based on the theory of Abstract Interpretation.
- diffkemp - Static analysis of semantic differences in kernel versionsa
- GaloisInc/yapall - A precise and scalable pointer analysis for LLVM, written in Ascent
- llvm2c - Decompiler of LLVM bitcode to C
- dr checker - A Soundy Vulnerability Detection Tool for Linux Kernel Drivers
- DG - Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode
- dg can integrate SVF, see here for details
- llvm-crash-analyzer -- crash analysis against coredump files based on LLVM Machine-IR, together with LLDB
- seahorn/clam - a static analyzer (CLI) based on seahorn/crab, the latter of which is abstract Interpretation-based library
- llvmlite - A lightweight LLVM python binding for writing JIT compilers
- LLVM Rust crates - Rust bindings
- go-llvm - Go binding
- C/C++/ObjC/ObjC++
- Swift
- GHC Haskell
- Rust
- Julia
- scala-native
- ldc
- Crystal
- codon
- numba
- mojo
- solang
- Ola - a toy language, for learning LLVM-backend codegen
go-llvm
- โ๏ธ LLVM Debian/Ubuntu nightly packages - Debian APT sources
- โ๏ธ Mac OS Homebrew Formula - HomeBrew's LLVM formula
- awesome-llvm-security - awesome llvm security projects
- static-analysis - A curated list of static analysis tools and linters for all programming languages, config files, build tools, and more
- dynamic-analysis - A curated list of dynamic analysis tools and linters for all programming languages, binaries, and more
- LLVM-Guide
- program analysis topics on GitHub
- other awesome lists on GitHub
- List of tools for static code analysis (on Wikipedia)