IRILL - Research and Innovation on Free Software
IRILL, 23 Avenue d'Italie, Paris, France - 3th floor

GCC MELT is a branch and plugin providing a powerful domain specific lispy language to code GCC extensions in. MELT offers several high level features and is translated to C code, hooked to GCC thru the plugins hooks. Notable features of MELT include: interface to most GCC internal types (like Gimple, Tree, Loop-s, etc.), a copying garbage collector, a single-inheritance, reflexive, object system, first-class functional values and anonymous functions, powerful and flexible pattern matching, easy integration of C code chunks. The tutorial is targeted for the GCC summit audience: people somehow familiar with the GCC internals (e.g. knowledgeable of the Gimple & Tree representations, and of the passes organization). It does not presuppose familiarity with Lisp. It will show how the main feature of the MELT domain specific language, how to code simple and more complex passes using MELT, how can passes share data, how to extend MELT itself, how to interface additional GCC internals to MELT, etc. MELT could be used to prototypes new ideas inside GCC, but is in particular intended for application-, entreprise-, or domain- specific extensions of GCC, e.g. for GCC extensions tailored to some big software project (improved diagnostics, specifc optimizations, source code processing, navigation, retro-engineering, ...).

This GCC summit MELT tutorial requires some basic knowledge about GCC internals. The first part of this tutorial will illustrate basic usage of MELT and introduce the MELT lispy domain specific language and the separation of MELT values from other stuff. It does not presuppose any familiarity with any Lisp variant. The second part of the tutorial will focus on MELT pattern matching facilities and show how to use them to concisely explore particular GCC internal representations (notably Gimple and Tree). The third part of the tutorial will detail how to code real GCC passes in MELT and suggest possible MELT extensions for several specific domains. It will give some insight on the internals of MELT.