FOSDEM is the biggest free and non-commercial event organized by and for the community. Its goal is to provide Free and Open Source developers a place to meet. No registration necessary.

   
Speakers
David Chisnall
Schedule
Day Sunday
Room Janson
Capacity 1400
Start time 14:00
End time 14:50
Duration 00:50
Info
Track Development Track
Attachments
Implementing DSLs with LLVM Slides (slides)
Examples (other)

Implementing Domain-Specific Languages with LLVM

Any sufficiently complex application eventually evolves its own scripting framework or domain-specific language. These can be simple things, like a graphical scripting language for connecting pre-existing building blocks together, a domain-specific language for performing image convolutions, or a general-purpose language like a Lisp or JavaScript dialect for writing extensions.

These are usually implemented as ad-hoc interpreters, which limits their utility things that are not performance critical. With LLVM, it is very easy to turn a quick-and-dirty interpreter into a high-speed JIT or static compiler. This talk will explain how to plug LLVM into your application and allow code in your scripting language to run (almost) as fast as compiled C.

LLVM is a set of libraries that can be assembled to build compilers and related tools. This talk will give a close look at some of the APIs, the core abstractions that they present, and how they are used.

LLVM is probably best known for the clang front end, which allows it to work as a drop-in replacement for gcc when compiling C-family languages. This use hides much of the power of LLVM. It is not a monolithic compiler, but a set of libraries that can be assembled to build a static compiler, a JIT compiler, or a variety of other things.

Most complex applications include some kind of scripting capability. These come in a variety of forms. Some include simple macro languages that allow the user to automate repetitive tasks. Some, such as EMACS and Firefox, include such powerful scripting environments that a significant fraction of the application ends up being written using them, making scripting performance very important. Graphical applications may embed a domain-specific language for things like image convolutions, which would benefit from being compiled down to SIMD instructions for the user's CPU.

Embedding LLVM in other applications is a relatively easy way of providing any of these. It is relatively easy to adapt an existing interpreter to use LLVM as a JIT compiler, or to write a new language front end and leave all of the code generation to LLVM. If you write a JIT compiler that uses LLVM, then it is trivial to extend it to provide static compilation, so anything written in your scripting language and embedded in the application can be compiled to native code ahead of time and linked into the binary, just like C code.

This talk will give a quick overview of the semantics of the LLVM intermediate representation and cover the main classes that a front end would need to use to generate it. It will draw on the experience from writing Étoilé's Smalltalk implementation, which uses the same underlying object model as Objective-C, to provide suggestions for closely integrating scripted and native code, as well as mechanisms for adding profile-driven optimisations that are specific to a given language.

Concurrent events:

When Event Track Where
11:00-17:00 LPI Item Writing Workshop Certification UA2.114
13:00-14:45 LPI Exam Session 4 Certification Guillissen
13:00-15:00 Smart card workshop Security H.2214
13:25-14:05 Modern PerlCommerce Perl AW1.121
13:30-14:10 How to trick a developer into being a designer? CrossDesktop H.1308
13:35-14:20 Balancing a game: the open source way Open Source Game Development AW1.120
13:45-14:15 Touch your NetBSD BSD K.4.201
14:00-14:15 EPFSUG - everybody needs a hacker! Lightning Talks Ferrer
14:00-14:25 Optimizing your innodb buffer pool usage MySQL and Friends H.1309
14:00-14:30 The State of Firefox Mobile Mozilla UD2.218A
14:00-14:30 Gervill - Beyond MIDI Free Java K.4.401
14:00-14:35 Cypher Query Language Graph Processing AW1.125
14:00-14:45 DevOps is not an absolute. It's a range. Configuration and Systems Management K.3.601
14:00-14:50 Why the community should welcome Average Jane and Joe Community K.1.105
14:00-14:55 Tracing and virtualization workshop, millikernels and anykernels Virtualization and Cloud Chavanne
14:00-15:00 Adventure of setting common account database for a distribution infrastructure CrossDistribution H.1301
14:00-15:00 Scribus X.org+OpenICC K.3.401
14:00-15:00 Automated Distribution Development and Maintenance CrossDistribution H.1302
14:00-15:00 EFL the upcoming embedded UI toolkit Embedded Lameere
14:00-16:30 Back to the future, (re) learn smalltalk Smalltalk AW1.126
14:05-14:45 A real Skype alternative using standards compliant FLOSS Telephony and Communications H.2213
14:10-14:55 The agony of choice - the diversity of microkernels in Genode Microkernel OS K.3.201
14:15-14:35 Rapid real-world testing using git-deploy Perl AW1.121
14:15-14:45 pkgsrc on MirBSD BSD K.4.201
14:15-14:55 Calligra - Free Office Everywhere CrossDesktop H.1308
14:20-14:35 Libre.fm and GNU FM - Supporting free culture artists with free software Lightning Talks Ferrer
14:30-14:55 MySQL creatively in a sandbox MySQL and Friends H.1309
14:30-15:00 The IcedRobot of Dawn, a one year long Free Sofware journey Free Java K.4.401
14:30-15:00 IT@Mozilla: Open sourcing the infrastructure Mozilla UD2.218A
14:30-15:15 Getting Started With Ogre3d For Game Development Open Source Game Development AW1.120
14:40-14:55 Managing your network with Netmagis Lightning Talks Ferrer
14:40-15:15 Ontological Conjunctive Query Answering over large, semi-structured knowledge bases Graph Processing AW1.125

Next (up to 3) talks in the same room (Janson):

When Event Track
15:00-15:50 The Apache Cassandra storage engine Development
16:00-16:50 From Dev to DevOps Development
17:00-17:50 Freedom, Out of the Box! Keynotes

Events that start after this one (within 30 minutes):

When Event Track Where
14:50-15:30 Secure SIP Communications with Kamailio Telephony and Communications H.2213
15:00-15:50 The Apache Cassandra storage engine Development Janson
15:00-15:15 mail2trac Lightning Talks Ferrer
15:00-15:25 Replication features of 2011: what they were, how to get and how to use them MySQL and Friends H.1309
15:00-15:30 Introduction to pkgsrc, and to package creation in NetBSD BSD K.4.201
15:00-15:30 Call a Cab to bring the Colors - Taxi DB X.org+OpenICC K.3.401
15:00-15:30 On the shoulders of giants: Developing a medical application using XULRunner and XForms Mozilla UD2.218A
15:00-15:40 POSIX::1003 Perl AW1.121
15:00-15:40 WebKitGTK+ status and roadmap to WebKit2 CrossDesktop H.1308
15:00-15:45 Who Pulls the Strings? Integrating OpenNMS with Modern Configuration Management Configuration and Systems Management K.3.601
15:00-15:50 You're doing it wrong! Community K.1.105
15:00-15:55 Building app sandboxes on top of LXC and KVM with libvirt Virtualization and Cloud Chavanne
15:00-16:00 PMH: Home Automation made right™ Embedded Lameere
15:00-16:00 Submission Review with Open Build Service CrossDistribution H.1302
15:00-16:00 ARM BoF CrossDistribution H.1301
15:00-16:45 LPI Exam Session 5 Certification Guillissen
15:05-15:50 Dive into HelenOS Device Drivers Microkernel OS K.3.201
15:20-15:35 An example graph visualization with Processing.js Graph Processing AW1.125
15:20-15:35 Home Automation with Open Remote Lightning Talks Ferrer