The Design of LLVM (Dr. Dobb's)
Dr. Dobb's has a
moderately detailed overview of the design of LLVM
by Chris Lattner.
"In particular, LLVM IR is both well specified and the only interface
to the optimizer. This property means that all you need to know to write a
front end for LLVM is what LLVM IR is, how it works, and the invariants it
expects. Since LLVM IR has a first-class textual form, it is both possible
and reasonable to build a front end that outputs LLVM IR as text, then uses
UNIX pipes to send it through the optimizer sequence and code generator of
your choice. It might be surprising, but this is actually a pretty novel
property to LLVM and one of the major reasons for its success in a broad
range of different applications. Even the widely successful and relatively
well-architected GCC compiler does not have this property: its GIMPLE
mid-level representation is not a self-contained representation.
to post comments)