What is LLVM?

What is LLVM?

What is LLVM and Why is it Useful?

 

Multiple mini-projects work under the LLVM umbrella. The mini-projects mainly deal with compiler technologies. There seems to be some confusion regarding the LLVM naming. People mistakenly assume it is related to virtual machines. There is no connection. The term LLVM doesn’t stand for anything. It is just a name that was used at the beginning of the project.

The LLVM project is operated under the “UIUC” BSD-Style license. The project originated in the University of Illinois. Since then it has gained popularity and it has been used for a large variety of projects. It’s especially popular in the academic circles. The main objective of the project to provide SSA-based static and dynamic compilation of various programming languages.

Here are the mini-project of LLVM:

  1. LLVM Core: The core libraries provide optimizer and code generation support for CPUs. LLVM IR(Intermediate Representation) provides the foundation for the libraries. The community has done a good job of documenting the LLVM Core. So you can easily use these libraries to create your new programming language or create a port of an existing compiler. If you are looking to venture into these territories, LLVM Core is a good place to start.
  1. Clang: It is a compiler that is three times faster than GCC. It targets C, C++, and Objective-C. The Clang errors and warnings are easier to understand. It also has a static analyzer tool. The static analyzer tool itself is built using the Clang compiler.
  1. LLDB: It is a debugger. It is faster and more efficient than GDB. The debugger is built using Clang and LLVM Core.
  1. libc++ and libc++ ABI: Better implementation of C++ STD.
  1. compiler-rt: It provides supports for low-level code. It also has run-times libraries for dynamic testing.
  1. OpenMP: Open Multi-Processing (OpenMP) is an API to help with multithreading. This project supports the native runtime for OpenMP to be used with Clang.
  1. Polly: In the LLVM world, it is a high-level loop and data-locality optimizer. It optimizes memory access patterns of programs.
  1. libclc: A library for OpenCL.
  1. klee: It is a symbolic virtual machine. You can use klee to traverse all the dynamic paths in a program to find problems. The machine can produce automated test cases.
  1. SAFECODE: It is a compiler for C/C++ to guarantee memory safety. It is a great tool for cybersecurity experts to explore. It can help with detecting memory safety errors.
  1. lld: It is building a linker to work with Clang and LLVM.

The LLVM has a reputation for creating cleaner binaries than GCC. Also, LLVM has external projects which can be used to compile Python, Haskell, PHP, LUA, Ruby and other languages. LLVM is considered a versatile, flexible and reusable solution. So it is gaining popularity in the development community. It is used as JIT compilers for embedded languages. LLVM is also being used for supercomputers. The broad support from the developer community is making it a robust tool.

Further Study:

Related Posts
Leave a Reply

Your email address will not be published.Required fields are marked *