The Project LLVM It is a collection of modular and reusable compilers and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines. The name "LLVM" itself is not an acronym; it's the full name of the project.
LLVM began as a research project at the University of Illinois, aiming to provide a modern SSA-based compilation strategy capable of supporting static and dynamic compilations of arbitrary programming languages. Since then, LLVM has grown into an umbrella project consisting of several subprojects, many of which are in production use by a wide variety of commercial and open source projects, in addition to being widely used in academic research. The code in the LLVM project is licensed under the Apache License 2.0 with LLVM exceptions.
The main subprojects of LLVM are:
The LLVM Core libraries provide a modern source- and target-agnostic optimizer, along with code generation support for many popular (and some less common!) CPUs. These libraries are built around a well-specified code representation known as the LLVM Intermediate Representation ("LLVM IR"). The LLVM Core libraries are well documented, and it is particularly easy to invent your own language (or port an existing compiler) to use LLVM as both an optimizer and code generator.
Clang is an LLVM-native C/C++/Objective-C compiler that aims to deliver incredibly fast compilations, extremely useful error and warning messages, and provide a platform for building excellent source-level tools. Clang Static Analyzer and clang-tidy are tools that automatically find errors in your code and are excellent examples of the kinds of tools you can build using the Clang interface as a library for analyzing C/C++ code.
The LLDB project relies on libraries provided by LLVM and Clang to provide an excellent native debugger. It uses Clang's AST and expression parser, LLVM JIT, LLVM's disassembler, and more, providing an experience that "just works." It's also incredibly fast and much more memory-efficient than GDB when loading symbols.
The libc++ and libc++ ABI projects provide a standard, high-performance implementation of the C++ Standard Library, including full support for C++11 and C++14.
The compiler-rt project provides highly tuned implementations of low-level code generator support routines such as __fixunsdfdi and other calls generated when a target doesn't have a short sequence of native instructions to implement a core IR operation. It also provides runtime library implementations for dynamic testing tools such as AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
The MLIR subproject is a novel approach to building a reusable and extensible compiler infrastructure. MLIR aims to address software fragmentation, improve compilation on heterogeneous hardware, significantly reduce the cost of building domain-specific compilers, and help connect existing compilers.
The OpenMP subproject provides an OpenMP runtime for use with the Clang OpenMP implementation.
The Polly project implements a set of cache locality optimizations, as well as auto-parallelism and vectorization using a polyhedral model.
The libclc project aims to implement the OpenCL standard library.
The Klee project implements a "symbolic virtual machine" that uses a theorem prover to attempt to evaluate all dynamic paths through a program in an effort to find bugs and prove the properties of functions. An important feature of Klee is that it can produce a test case if it detects a bug.
The LLD project is a new linker. It's a direct replacement for the system linkers and runs much faster.
In addition to the official LLVM subprojects, there is a wide variety of other projects that use LLVM components for various tasks. Through these external projects, you can use LLVM to compile Ruby, Python, Haskell, Rust, D, PHP, Pure, Lua, and several other languages. One of LLVM's main strengths is its versatility, flexibility, and reusability, which is why it is used for such a wide variety of different tasks: from lightweight JIT compilations of embedded languages like Lua to compiling Fortran code for massively powerful computers.
As with everything else, LLVM has a large and friendly community of people interested in building great low-level tools. If you're interested in getting involved, a good place to start is by browsing the LLVM Blog and signing up for the LLVM Developers mailing list. For information on submitting a patch, getting commit access, and copyright and licensing issues, see the LLVM Developer Policy.
Install full clang on debian 12 release 14:
LLVM
$ sudo apt install llvm llvm-runtime llvm-14-doc
Clang
$ sudo apt install clang clang-tools python3-clang
lld
$ sudo apt install lld lldb
You already have the compiler, debugger, libraries and tools needed to develop software in C/C++/Objective-C programming languages on Linux.
Descubre más desde javiercachon.com
Subscribe to get the latest posts sent to your email.



