Hacker News new | ask | show | jobs
by exDM69 5307 days ago
edit: LLVM once stood for "Low level virtual machine", but that is no longer the meaning. The early name comes from Chris Lattner's research paper describing an "ideal machine language", an intermediate language for compilers which is a little like an Assembly -type language for a virtual machine with infinite registers.

The first sentence on the front page of llvm.org pretty much sums it up: "The LLVM Project is a collection of modular and reusable compiler and toolchain technologies."

It may not be the clearest LLVM description out there, but that's pretty much what it is. If the description had more detail, it would not fit in one sentence.

The hard thing about describing LLVM is that it's a huge complicated project in a domain that's outside even many professional programmers' domain.

I tend to say that LLVM is (to me) a "compiler infrastructure", because I use it to build compiler back ends. However, LLVM is so much more than that, as the project includes loosely coupled tools ranging from complete compilers (clang) to debuggers (lldb) to byte code and binary format introspection utilities (llvm's binutils counterparts). So a "compiler infrastructure" or any other dumbed down explanation wouldn't do it justice. That's why the first sentence on the front page is actually pretty good.

2 comments

LLVM actually still is a virtual machine, since it contains mechanisms for executing code written in LLVM IR. There are two execution paths - an interpreter and a JIT compiler. I guess this makes it a VM after all, although the acronym is no longer descriptive because the VM part is a tiny fraction of what LLVM includes and can do. As you said, its super-tool for creating compilers, especially compiler back-ends.
The LLVM interpreter is less than ideal as an actual interpreter rather than something for doing constant folding and that kind of thing; the instructions are too low-level for it to be really fast. For example, bit widths of integers are represented in the abstraction; that adds overhead to even the simplest of arithmetic operations.
I don't think the interpreter was intended to be really fast. It's pretty good for debugging and platform-independent execution. For speed there's the JIT.
"if the name is an acronym, you should spell out the acronym"

(I did not downvote you BTW)

Someone else replied that the project is now just referred to as LLVM. That's fine, but people expect acronyms to stand for something, and the definition or lack of should be way at the top of any project. Lots of people come to a project for the first time and aren't in the know.

Sorry, missed the acronym part. Anyway, spelling out the acronym only creates more confusion.

I don't understand the downvotes, if you downvoted, please tell why. I tried to be sensible in explaining what LLVM is and why it's hard to explain. And why it's no longer an acronym.

pedantic: LLVM is not an acronym, it is an initialism. An acronym is when the abbreviated letters spell something pronounceable as a word (GNU, NATO, SCUBA, PATRIOT act...) an initialism is just an abbreviation using the first letter of every word in the abbreviated name or phrase.

http://en.wikipedia.org/wiki/Acronym_and_initialism