At the beginning of August 2008 we had the second annual Low Level Virtual Machine (LLVM) Developers' Meeting at Apple's main campus in Cupertino, California, USA. LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, Just-In-Time code generators, and many other compiler-related programs. LLVM is currently being used for both a wide variety of academic research projects and commercial applications.
More than 100 participants attended 12 technical presentations (slides and videos available) on LLVM and its applications.
Highlights from the meeting included talks on Clang, a new, multipurpose frontend for C-based languages, the LLVM optimizer, code generator, and JIT component, and various applications of LLVM.
This event would not been possible without the generous support of Google, who funded the travel expenses for several students (Nicolas Geoffray, Nuno Lopes, Anton Korobeynikov, Tim Sander) who all presented their LLVM-related work at the meeting. All of them were kind enough to send us some notes about their experience at the developer meeting!
Nicolas Geoffray writes:
At the LLVM Developers' Meeting I presented VMKit, an implementation of both the JVM and a CLI Virtual Machines (Microsoft .NET is an implementation of the CLI) using the Just-In-Time compiler of LLVM. It runs regular Java and C# applications by translating instructions to LLVM's internal representation and executing the code LLVM generates dynamically. (slides, video)
Besides LLVM, VMKit uses existing projects such as the Boehm garbage collector or the GNU Classpath libraries to create complete instances of virtual machines. In essence, VMKit is a runtime engine which dynamically loads and lookups classes, methods, and fields.
My talk described how VMKit combines components from various systems to create complete virtual machines, and how the translation from bytecode to LLVM instructions works. After giving the current performance status of the system, it discusses areas for future work in VMKit as well as in LLVM.
About Nicolas: Nicolas is a Ph.D. student in computer science at the University of Pierre et Marie Curie, France. Nicolas was a Google Summer of Code™ (GSoC) mentor this year for both LLVM and VMKit.
Nuno Lopes writes:
In August, I attended the 2nd LLVM conference, where I gave a talk on "Building a JIT compiler for PHP in 2 days." This was made possible by Google, who sponsored the trip. Apple (in particular Ted & Tanya) organized the conference. A big thank to you all for making this possible!
Attending the conference was such a great experience: I was finally able to meet all those guys that I usually discuss with via e-mail and IRC! This is also good to strengthen the relationship between the developers. I learned a lot from the talks I've attended and also from the nice discussions I've joined. As a student it's also very interesting to meet and chat with people from corporations, to get some feeling of what is being done in the "real world" and how they are doing it. I was amazed with the big amount of interest in LLVM from big companies.
My talk's room was near full, which was a nice surprise! I was delighted to share our experience in making a simple JIT compiler with LLVM in a matter of days. The project was started just this year with the participation of a Summer of Code student and it is already able to pass the whole PHP test suite. It also performs good on benchmarks, but in the next months I'm sure we will see huge improvements.
I hope others can follow the idea and do a JIT compiler for their own interpreter of choice. What are you waiting for? Go do your new JIT compiler! :-)
You can take a look at the source code of the PHP JIT compiler (currently in CVS only).
Finally I would like to thank all the LLVM developers for producing such a great piece of software. It's the easiest, though very powerful, compiler I've ever hacked.
About Nuno: Nuno is pursuing his Masters degree in Information Systems and Computer Engineering at the Technical University of Lisbon, Portugal. He was a GSoC mentor for the PHP project in 2008.
Anton Korobeynikov writes:
The LLVM Compiler Infrastructure project grew up rapidly during last few years. And I think an idea of developers' meeting was really nice and appeared in proper time. It was second LLVM Developer's Meeting had been held in the August, 1. It seems, that number of people attended the meeting was as twice as comparable with the previous year. I think it's really good indicator for the LLVM Project.
The schedule of the meeting was rich. It was divided into two parts: talks about project itself and talks about cool and crazy ways to use LLVM in applications. Project-related talks covered huge variety of different themes, starting from new C and Objective-C frontend and how different interesting tools can be built on top of it (for example - static code checker). There were some talks describing internal structure of the LLVM target-independent code generator, LLVM's JIT compiler component, etc. Secondly, there were talks about cool uses of LLVM. We started from Adobe After Affects, passed through Java/.NET machine on top of LLVM, code generation for FPGAs, secure memory architecture built on top of LLVM, and ended with Quake running in the web browser! Sometimes applications are really crazy. :)
I doubt I would have been able to attend the meeting without generous support from the meeting sponsors. So, just 16 hours in planes and I'm in the Pacific Time with talk ready to show. I prefer to work on different backend-related bits in LLVM, but despite of that, my talk was about new LLVM component added to recent 2.3 release: the new LLVM compiler driver, llvmc2 (slides, video). It was the project I mentored and did the overall design. A compiler driver is sort of a 'dispatcher' tool, which knows how to execute different tools like the compiler itself, the assembler, and linker in order to produce a final binary from the sources provider. It's a small but really important tool because it needs to know about all different options of each tool involved in the compilation process, manage temporary files, arguments passing, etc. Our aim was to make such compiler driver universal, flexible and easily reconfigurable.
I found the meeting really well organized, so I would like to thank everyone involved and I'm definitely sure next meetings will be as good as this one!
About Anton: Anton is a Ph.D. student in applied statistics at Saint Petersburg State University, Russia. Anton is one of the principal code owners for LLVM as well as LLVM's project adminstrator for this year's GSoC.
Tim Sander writes:
The LLVM Developer Conference at the beginning of August was my first trip to the famous Silicon Valley. Without sponsorship from Google, it would have not been possible. It was a very interesting experience.
The most interesting event was of course the LLVM Developer Meeting itself. I really liked the balance between talks and the possibility to do some conversation in the breaks. Of course my talk about the hardware/software codesign in LLVM is also available for download (slides, video). Currently I am busy working on a bigger example for the codesign backend and some hopefully much improved HW-backend stuff. So probably one fine day these changes might find their way into the LLVM repository.
Besides all this technical stuff I also really enjoyed the trip with all the LLVM illuminates to San Francisco where we did a little bit of sightseeing and had some more time for more or less technical discussions. I also took took the opportunity to take a look at the Bay Area and did a little bit of hiking through the beautiful landscape. Beside all this LLVM related stuff I really found it really interesting to visit the USA for the first time in more than 10 years. It's always very interesting to see the "American way of life."
About Tim: Tim is a Ph.D. student at ICS, Technische Universität Darmstadt.
Many thanks to Anton, Nicolas, Nuno, and Tim for sharing their experiences, and for the generous support of Google's Open Source Programs Office in making this event possible!