The LLVM Compiler Infrastructure

December 4, 2025 ยท View on GitHub

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.




MLIR-FUZZ-LTS

This repository provides long-term support (LTS) versions of MLIRSmith, MLIRod, and DESIL. We plan to update these tools every six months or annually. For each release, we also provide a Docker container to help users quickly get started.

The project integrates mlirsmith, mlirod, and desil into mlir/tools and includes several scripts for testing and running the tools.

The current base commit is: b83e458fe5330227581e1e65f3866ddfcd597837

The provided docker image can be found at: https://zenodo.org/records/17808553

Running MLIRSmith, MLIRod, and DESIL in Docker

Tool Functionality Test

A validation script is available under /MLIR-FUZZ-LTS/mlir-test. This script checks both the correctness of generated MLIR programs and the basic functionality of the included tools.

Run: python3 test.py

Running the Tools

The script /MLIR-FUZZ-LTS/mlir-scripts/driver.sh provides a unified driver for running the three tools. You may also inspect the script to learn how to invoke each tool separately.

Build From Source

You can build and run the tools manually using the following commands:

cd MLIR-FUZZ-LTS
mkdir build
cd build
cmake -G Ninja ../llvm \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DLLVM_ENABLE_PROJECTS=mlir\;clang\;llvm \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON
cmake --build .

After building:

  • Add build/lib to your LD_LIBRARY_PATH.

  • All scripts under mlir-test and mlir-scripts assume that MLIR-FUZZ-LTS is located at the filesystem root (/).

  • Follow the instructions above to run the tools.