lli
executes LLVM bitcode using a JIT compiler
TLDR
Run LLVM bitcode
SYNOPSIS
lli [options] file [args]
DESCRIPTION
lli directly executes programs in LLVM bitcode (.bc) or LLVM assembly (.ll) format using a just-in-time (JIT) compiler. Rather than producing a standalone executable on disk, lli compiles the LLVM IR to native machine code in memory at runtime and immediately begins execution, making it a convenient tool for quickly testing and prototyping LLVM IR without a separate compilation and linking step.
The tool supports two execution engines: the JIT compiler (default), which translates functions to native code on demand for near-native performance, and a slower interpreter mode enabled with `-force-interpreter`. The JIT backend can be selected between MCJIT and the newer ORC engine via the `-jit-kind` flag. Program arguments can be passed after the bitcode filename, allowing lli to run LLVM programs just like native executables.
PARAMETERS
FILE
LLVM bitcode or IR file.ARGS
Program arguments.-force-interpreter
Use interpreter instead of JIT.-jit-kind KIND
JIT engine type (mcjit, orc).-entry-function NAME
Entry function name.--help
Display help information.
CAVEATS
Requires LLVM bitcode input. JIT overhead on startup. Part of LLVM toolchain.
HISTORY
lli is part of the LLVM project, providing a way to directly execute LLVM intermediate representation.
