2 ms·
LLVM's intermediate representation is more low-level than JVM bytecode and provides no safety guarantees, allowing it to be used for any language including C.
by modeless 17y ago
LLVM's intermediate representation is more low-level than JVM bytecode and provides no safety guarantees, allowing it to be used for any language including C. LLVM does not provide a language runtime, garbage collector, or JIT compiler. In fact, its principal use right now is as the backend of ahead-of-time compilers like GCC and Clang.
What LLVM does provide is a bunch of optimizers that operate on LLVM IR, and a bunch of code generators that take LLVM IR and spit out machine code for different CPUs. Traditionally these things have been inseparable parts of a larger monolithic codebase (e.g. GCC). Compiler writers can now reuse LLVM's optimizers and code generators instead of writing their own, and instead focus on the frontend parts where all the interesting language features live.
- chc 17y agoActually, LLVM does provide a JIT compiler. It supports both AOT and JIT compilation.