Essential Abstractions in GCC
(A tutorial being conducted in conjuction with CGO 2011,
Chamonix, France)
- Motivation:
The GNU
Compiler collection is a compiler generation
framework which constructs a compiler for a given architecture by
reading the machine descriptions for that architecture. This framework
is practically very useful as evidenced by the existence of several
dozens of targets for which compilers have been created using GCC.
These compiler are routinely used by millions of users for their
regular compilation needs. While a deployment of GCC on the default
parameters is easy, any other customization, experimentation and
modification of GCC is difficult and requires a high amount of
expertise and concentrated efforts. In this tutorial we describe
some carefully chosen abstractions that help one to understand the
retargetability mechanism and the architecture of the compiler
generation framework of GCC and relate it to a generated compiler.
- A summary of topics covered:
Meeting
the challenge of
understanding GCC. The architecture of GCC. Generating a compiler from
GCC. The structure of a GCC generated compiler. First level graybox
probing of the compilation sequence of a GCC generated compiler. Plugin
structure of GCC to hook in front ends, optimization passes, and back
end. Introduction to machine descriptions. Retargetability and
instruction selection mechanism of GCC.
People interested in using GCC for
their research as well as people interested in contributing to GCC will
benefit from this tutorial. It is expected that this tutorial will
bring down their ramp up period into GCC from several frustrating
months to a few stimulating weeks. This tutorial will also be useful
for people who are interested in relating class room concepts of
compilation to a large scale practical compiler which is widely used.
- Special requirements:
This tutorial is a lecture based tutorial and hence it is not necessary
for the audience to bring a laptop. Soft copies of the slides will be
made available on this page well in advance.
Uday Khedker finished Ph.D. in Computer
Science & Engg. From IIT Bombay in 1995 and taught at the
Department of Computer Science at Pune University from 1984 to 2001.
Since then, he is with IIT Bombay where currently he is Professor of
Computer Science & Engg.
His areas of interest are Programming Languages and Compilers and he
specialises in data flow analysis and its applications to code
optimization. A recent research thrust involves cleaning up the GNU
Compiler Collection (GCC) to simplify its deployment, retargetting,
and enhancements. Other goals include increasing its
trustworthiness as well as the quality of generated code. He has
published papers in leading journals and conferences, has contributed
chapters in Compiler Design Handbook and has authored a book titled
“Data Flow Analysis: Theory and Practice”. He has also worked very
closely with the industry.