Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.31 KB

README.md

File metadata and controls

29 lines (22 loc) · 1.31 KB
layout toc_group link_title permalink
docs
llvm
LLVM Languages Reference
/reference-manual/llvm/

GraalVM LLVM Runtime

The GraalVM LLVM runtime can execute programming languages that can be transformed to LLVM bitcode. This includes languages like C/C++, Fortran and others.

In contrast to static compilation that is normally used for LLVM-based languages, GraalVM's implementation of the lli tool first interprets LLVM bitcode and then dynamically compiles the hot parts of the program using the GraalVM compiler. This allows seamless interoperability with the dynamic languages supported by GraalVM.

Running LLVM Bitcode on GraalVM

To run LLVM-based languages on GraalVM, the binaries need to be compiled with embedded bitcode. The Compiling guide provides information on how to compile a program to LLVM bitcode and what file format is expected.

The syntax to execute programs in LLVM bitcode format on GraalVM is:

lli [LLI options] [GraalVM options] [polyglot options] <bitcode file> [program args]

Here, <bitcode file> is a compiled program with embedded LLVM bitcode. See LLI Command Options or use lli --help for options explanations.

Note: LLVM bitcode is platform-dependent. The program must be compiled to bitcode for an appropriate platform.