tags:

views:

309

answers:

3

I keep hearing about LLVM all the time. It's in Perl, then it's in Haskell, then someone uses it in some other language? What is it?

A: 

Did you look at its home page? http://llvm.org/

Chandru
I couldn't understand what it was from it. :(
bodacydo
+8  A: 

LLVM is a library that used to construct, optimize and produce intermediate and/or binary machine code.

LLVM can be used as a compiler framework, where you provide the "front end" (parser and lexer) and the "back end" (code that converts LLVM's representation to actual machine code).

LLVM can also act as a JIT compiler - it has support for x86/x86_64 and PPC/PPC64 assembly generation with fast code optimizations aimed for compilation speed.

If you're interested, you can play with LLVM's machine code that is generated from C or C++ code in their demo page.

LiraNuna
Thanks for the detailed answer. Now I know. :)
bodacydo
If you want to play with it, look at this amazing article: http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/
LiraNuna
+2  A: 
N 1.1