What is an LLVM?

LLVMlow-level virtual machine is a library with a collection of reusable, modular compiler toolchain technologies. These tools can be used to develop the front end for any programming language and the back end for any instruction set architecture.

LLVM logo
LLVM logo

LLVM provides you with tools to programmatically create machine-native code. You can use the API to generate instructions in a format called an intermediate representation.

Intermediate representation, or IR, is a language-independent representation that serves as a portable, high-level assembly language that can be further optimized.

LLVM can compile the IR into a standalone binary or perform a JIT (just-in-time) compilation on the code (ex: as an interpreter for the language).

A summary of the LLVM compiler infrastructure
A summary of the LLVM compiler infrastructure

LLVM is written in C++ and is designed for compile-time, link-time, run-time, and idle-time optimization. Popular languages with compilers that use LLVM include Fortran, Haskell, Julia, Kotlin, Lua, Objective-C, OpenGL, Rust, and Swift.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved