This README contains bare resources for LLVM-relevant techniques; for Clang-specific resources, please check Clang.md in this repo. Only well-maintained projects/websites/docs are included; PRs are welcome.
Documentation (reference)
- LLVM Language Reference Manual
- LLVM Programmerโs Manual
- LLVM Coding Standards
- LLVM Style RTTI
- Writing an LLVM Pass
- LLVM Alias Analysis Infrastructure
- Source Level Debugging
- Create A Project
- LLVM Developer Policy
- CommandLine 2.0 Library Manual
- Getting Started with the LLVM System
- LLVM Tutorials
- Python Version of the LLVM Tutorial
- LLVMโs Analysis and Transform Passes
- LLVM FAQ
- LLVM Testing Infrastructure Guide
- The Often Misunderstood GEP Instruction
- Exception Handling in LLVM
- LLVM Bitcode File Format
- Writing an LLVM Backend
- Sanitizers - AddressSanitizer, MemorySanitizer, ThreadSanitizer, UndefinedBehaviorSanitizer, LeakSanitizer, etc
- Tutorial: Creating an LLVM Backend for the Cpu0 Architecture
- http://llvm.org/, and its doxygen docs
- https://llvm.org/devmtg/ - LLVM Developers' Meeting and other events
- http://blog.llvm.org/ - official blog
- discourse forum
- Mailing List: llvm-weekly
- LLVMProj @ YouTube - official account, including LLVM devmeeting, EuroLLVM, etc
- Open Projects
- 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
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
https://github.com/lahiri-phdworks/LLVM-Examples/tree/master - LLVM Repository and Code samples. LLVM Passes and quick bytes.
https://github.com/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
- http://llvm.org/pubs/
- LLVM @ Google Scholar
- LLVM @ Microsoft Academic Search
- LLVM @ ACM-DL
- LLVM @ IEEEXplore
- LLVM @ DBLP
- ๐ Learn LLVM 12 - good to start with
- ๐ 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
- 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
- Compiler-RT - runtime libraries, including sanitizers, profiling utilities, etc
- MLIR - Multi-Level Intermediate Representation
- libfuzzer - a library for coverage-guided fuzz testing
- LLDB - The 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
- llvm/Torch-LLVM - first class support from the PyTorch ecosystem to the MLIR ecosystem
- llvm/Polygeist - C/C++ frontend for MLIR
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
- 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
- SCRT/avcleaner - C/C++ source obfuscator for antivirus bypass
- 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
- llvmlite - A lightweight LLVM python binding for writing JIT compilers
- LLVM Rust crates - Rust bindings
- go-llvm - Go binding
- โ๏ธ 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 (SAST) 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
- https://github.com/mikeroyal/LLVM-Guide
- other awesome lists on GitHub
- List of tools for static code analysis (on Wikipedia)