4 ms·
LLVM is an extremely open backend. So it can be used for many projects a short list of its usages: * Compiling SPIR-V shaders to GPU executables * Compiling C
by valarauca1 9y ago
LLVM is an extremely open backend. So it can be used for many projects a short list of its usages:
* Compiling SPIR-V shaders to GPU executables
* Compiling C
* Compiling C++
* Compiling Rust
* Compiling Haskell
* Compiling Swift
* JIT compilers for databases
* JVM JIT
Effectively once you translate to LLVM-IR you are basically home free, the LLVM can handle the rest. Which means you have a board range of people providing optimization passes, and catching bugs.
---
With the GCC its IR is tightly coupled to the C front end. While there has been some decoupling, this is generally considered a feature as it doesn't allow for a corporation to _run away_ with part of the project.
---
The LLVM is more modular, you can pick and take what you need. You can embed it, or call it externally. It is a hybrid BST/MIT/X11 license so it is open source, and embedding it in your project doesn't mean your project becomes GPL'd.
- floatboth 9y agoAlso used to be in WebKit's JS engine https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ now replaced with a custom thing https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/ https://webkit.org/blog/5852/introducing-the-b3-jit-compiler...