LLVM Project News and Details from the Trenches

Thursday, December 24, 2009

Clang Builds LLVM

Just in time for the Christmas holiday, the Clang project has hit a major milestone: Clang can now build all of LLVM and Clang!

The resulting Clang-built-Clang is not yet functional, so this "self-build" milestone is well short of full self-hosting. However, self-building indicates that C++ parsing, semantic analysis, and code generation is solid enough to compile the entirety of LLVM (~350k lines of C++ code) and Clang (~200k lines of C++ code) and produce object files that link together properly. To get to this point, we've fixed many bugs in Clang (when compiling C++ code), but also several bugs in LLVM and Clang that were found by Clang itself.

We are tracking a number of Clang bugs that manifest when building LLVM and Clang, as we make our way to the next big milestone: full self-hosting of Clang!

Saturday, December 19, 2009

Advanced Topics in Redundant Load Elimination with a Focus on PHI Translation

In our previous post on GVN we introduced some basics of load elimination.  This post describes some advanced topics and focuses on PHI translation: what it is, why it is important, shows some nice things it can do, and describes the implementation in LLVM.

Friday, December 18, 2009

The Dreaded Two-Phase Name Lookup

C++ has more than its fair share of dark, dank corners, especially where templates are concerned. One of the most vexing is "two-phase name lookup", which involves lookup for any names that occur in the body of a template. As you might expect, there are two different phases of templates:


Thursday, December 17, 2009

Introduction to load elimination in the GVN pass

One very important optimization that the GVN pass (opt -gvn) does is load elimination. Load elimination involves several subsystems (including alias analysis, memory dependence analysis, SSA construction, PHI translation) and has many facets (full vs partial redundancy elimination, value coercion, handling memset/memcpy, etc).  In this post, I introduce and motivate the topic, which will let us expand on it in future posts.

'lit' it

If you've been watching LLVM and Clang, you'll notice that there is a new testing tool we are using called lit. Clang has already moved to it, and LLVM has support for it (DejaGNU is still the default, but is being phased out). I thought I'd write a little bit about why I wrote lit, what it is, and how it will make your life better. :)

Monday, December 14, 2009

Welcome to the LLVM Blog

Welcome to the new and shiny LLVM Blog.  We've noticed that while the greater LLVM community active and thriving, that it is very difficult for people who aren't hacking on it to follow interesting developments. A related problem is that the LLVM web page is really old and crufty, and various bits of it were true of some (long ago) time, but which aren't true anymore. This blog is an attempt to fix this problem, by providing a way for people to percolate interesting news out to the world, news that includes a date on it!