LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

llc

compiles LLVM intermediate representation to machine code

TLDR

Compile LLVM IR to assembly
$ llc [input.ll]
copy
Output to file
$ llc -o [output.s] [input.ll]
copy
Compile to object file
$ llc -filetype=obj [input.ll]
copy
Target specific architecture
$ llc -march=[x86-64] [input.ll]
copy
Optimization level
$ llc -O[2] [input.ll]
copy
List targets
$ llc --version
copy

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.

INSTALL

sudo apt install llvm
copy
sudo dnf install llvm
copy
sudo pacman -S llvm
copy
sudo apk add llvm
copy
sudo zypper install llvm
copy
brew install llvm
copy
nix profile install nixpkgs#llvm
copy

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.

SEE ALSO

clang(1), opt(1), lli(1), llvm-as(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid