
2nd HiPEAC GCC Tutorial: How To and Return on Experience
2nd HiPEAC GCC Tutorial: How To and Return on Experience
The free GNU Compiler Collection is the leading tool suite for portable developments on open platforms. It supports more than 6 input languages and 30 target instruction sets, with state-of-the-art support for debugging, profiling and cross-compilation. It has long been supported by the general-purpose and high-performance hardware vendors. The last couple of years have seen GCC taking momentum in the embedded system industry, and also as a platform for advanced research in program analysis, transformation and optimization.
Context
The HiPEAC network supports GCC as a platform for research and development in compilation for high-performance and embedded systems. It encourages researchers from inside and outside the network to share experience, projects, and prototypes based on this common platform.
This tutorial is a followup to the 1st HiPEAC GCC Tutorial. The aim is to bootstrap and encourage research and developments involving GCC, and to help experts and non-experts exchange ideas, information and projects.
The targeted audience is the compilation/architecture researcher/engineer from industry or academia with a good background in textbook compilation and optimization. Prior knowledge of a compiler infrastructure is not assumed in the morning session. Conversely, people with a lot of experience are encouraged to attend the afternoon session.
Notice we will address practical issues aimed at helping developers with typical problem-solving and technical design issues. The overlap with GCC-related courses presented during the ACACES 2005 and 2006 summer schools should be minimal.
Outline
- Morning session.
- Introduction to GCC internals (Albert Cohen).
- How to add a simple pass or customize code generation (Albert Cohen).
- In-depth study: the compilation flow of the autovectorizer (Dorit Nuzman).
- Afternoon session.
- Keynote: advanced analyses and optimizations, OpenMP and automatic parallelization (Diego Novillo).
- Case-studies (HiPEAC-supported projects with GCC).
- GCC to .NET CIL bytecode (Roberto Costa).
- An API for iterative and adaptive optimization (Grigori Fursin).
- GRAPHITE: polyhedral analyses and transformations (Sebastian Pop).
Information
Online references for research and development involving GCC.Technical documentation
- Of course, the GCC Internals pages, and for this tutorial, specifically sections 6 to 14. Further readings are recommended as well, some of them are detailed below.
- There have been four GCC Summits so far; the proceedings are available online (replace 2006 with 2003, 2004 or 2005 to get the older ones; proceedings for this year should be available momentarily).
- The Wiki is a good (yet incomplete) source of practical information (including debugging and various HOWTOs):
- One particularly relevant section of the Wiki gathers the slides and support material for the ACACES 2006 (the HiPEAC summer school) Course on GCC for Optimization Research.
- Quick help to debug GCC (more information will be available online for the tutorial).
- Summary of the steps to write a new pass.
- The Wikibooks version of the GCC Internals.
- Tree-SSA doxygen.
- For historical purposes: the Tree-SSA development branch, now closed (merged into the mainline); gave birth to GCC 4.0 (up-to-date documentation is in the Internals and Wiki pages).
Selected research projects involving work on GCC internals
- The auto-vectorization page for a great example of cutting-edge R&D, with a lot of examples and experience.
- Link-time optimization efforts in GCC: the original approach Mark Mitchell, Diego Novillo's advanced IR and sparse alias representation, Chris Lattner's LLVM interface. A Wiki page has been started on this ambitious project.
- A short but excellent tutorial on GIMPLE traversing and manipulations, supporting a plugin infrastucture to compiler-assisted instrumentation for software verification.
There is a recent surge of top-quality publications on advanced compilation and compiler optimizations in particular: automatic vectorization in PLDI'06 (Nuzman et al.) and CGO'06 (Nuzman et al.), thread-level speculation in PPoPP'06 (Liu et al.) and ICS'05 (Renau et al.), induction variable recognition in HiPEAC'05 (Pop et al.), template meta-programming with concepts in PoPL'06 (Dos Reis et al.), and others to come!
Several research projects have translated into production passes of GCC and have been published in the GCC Summit.
Support material
See the attached slides below.
| Attachment | Size |
|---|---|
| 1_Introduction.pdf | 3.19 MB |
| 2_Middle_End.pdf | 3.39 MB |
| 3_Back_End.pdf | 592.16 KB |
| 4_Nuzman.pdf | 2.92 MB |
| 4_Nuzman.ppt | 1.43 MB |
| 5_Novillo.pdf | 182.21 KB |
| 6_Costa.pdf | 84.5 KB |
| 7_Fursin.pdf | 107.58 KB |
| 7_Fursin.ppt | 197.5 KB |
| 8_Pop.pdf | 298.08 KB |
![[gcc.gnu.org]](http://gcc.gnu.org/gcc.png)