Home

lli

lli is a command-line tool that executes LLVM bitcode by interpreting it and, in some configurations, by just-in-time compiling it to native code. It is part of the LLVM Project and is often described as the LLVM interpreter. Programs can be compiled to LLVM’s intermediate representation (IR) by front ends such as clang and then run directly with lli without generating machine code for a specific platform.

When invoked, lli loads a bitcode file, initializes the LLVM runtime, and executes the program’s entry point.

Implementation-wise, lli leverages the LLVM execution infrastructure, which in modern configurations includes both interpretation and just-in-time

See also: LLVM Project, LLVM IR, Clang, ExecutionEngine, MCJIT, ORC JIT.

It
can
work
with
additional
bitcode
libraries
to
extend
functionality
and
may
rely
on
the
host
system
libraries
for
input,
output,
and
other
runtime
services.
The
tool
is
designed
to
provide
a
convenient
way
to
test
and
prototype
LLVM
IR,
verify
IR
transformations,
and
debug
low-level
code
without
a
separate
native
compilation
step.
compilation
capabilities.
This
allows
hot
spots
in
the
code
to
be
compiled
on
the
fly
for
better
performance
on
long-running
tasks,
while
still
supporting
straightforward
interpretation
for
shorter
runs
or
debugging.
The
exact
behavior
can
depend
on
the
LLVM
version
and
the
available
execution
engine
backends.