llc
compiles LLVM intermediate representation to machine code
TLDR
Compile LLVM IR to assembly
SYNOPSIS
llc [options] file
DESCRIPTION
llc is the LLVM static compiler that translates LLVM intermediate representation (IR) into native machine code. It accepts input in either LLVM bitcode (.bc) or human-readable LLVM assembly (.ll) format and produces target-specific assembly language or object files. As the backend stage of the LLVM compilation pipeline, llc performs instruction selection, register allocation, and machine-specific optimizations to generate efficient code for the target architecture.
The tool supports a wide range of target architectures including x86, ARM, AArch64, MIPS, RISC-V, and others, selectable via the `-march` and `-mtriple` flags. Optimization levels from `-O0` (no optimization) through `-O3` (aggressive optimization) control how much effort llc spends on code improvement during compilation. Output can be either textual assembly (default) or a relocatable object file when using `-filetype=obj`, making llc useful both for inspecting generated code and for producing linkable artifacts directly.
PARAMETERS
FILE
LLVM bitcode or IR file.-o FILE
Output file name.-filetype TYPE
Output type (asm, obj, null).-march ARCH
Target architecture.-O LEVEL
Optimization level (0-3).-mtriple TRIPLE
Target triple.--help
Display help information.
CAVEATS
Requires LLVM IR input. Target support varies. Part of LLVM toolchain.
HISTORY
llc is part of the LLVM compiler infrastructure project, providing the backend compilation step.
