CS 243
Advanced Compiling Techniques
Winter 1998
Instructor Information
Name: Amer Diwan
Email: diwan@cs.stanford.edu
Office: Gates 442
Telephone: 650-723-4013
Office Hours: Wednesday 3:00 to 5:00 p.m. (in Gates 459) and/or by appointment
TA Information
Name: Greg Humphreys
Email:
humper@cs.stanford.eduOffice: Gates 381
Telephone: 723-6059
Office Hours: Tuesday and Thursday 1:00 to 3:00 p.m. (in Gates 381)
Email is the preferred way to contact us.
While CS143 focuses on the overall compilation process, CS243 focuses on how to produce good code for the programs being compiled ("optimizations"). The course is divided into three (unevenly sized) segments. The first part will cover fundamental analyses and representations that are needed by the optimizations. The second part will cover a number of optimizations found in most modern compilers, such as register allocation and instruction scheduling. The third part covers promising new optimizations, in particular, those for object-oriented languages. These optimizations are not yet in commercial compilers.
The text for the course is Steven Muchnick’s "Advanced Compiler Design and Implementation". The textbook web page (
http://www.mkp.com/books_catalog/1-55860-320-4.asp) has an "errata" link that contains a list of known mistakes in the book. I strongly recommend that you incorporate those fixes into your text before you start reading. Another useful (but optional) text is Aho, Sethi, Ullman’s "Compilers: Principles, Techniques, and Tools".The lectures will focus on the most important intuitions and techniques rather than all the low-level details of compiler optimizations. The text, however, does go into good detail. You are responsible for reading and understanding the material in the assigned readings. The homework assignments and exams will also include all the material covered in the assigned readings. The readings will be extensive; however, unlike most other compiler courses, there won’t be any big programming projects.
In addition to readings for each class, there will be weekly assignments, two mid-term exams, a final exam, and a final project.
40% homework, 40% exams, and 20% final project
The following is the tentative syllabus for the course. Some topics may be added or deleted as necessary.
|
Lecture |
Topic |
Readings |
|
1 |
Introduction to compiler optimizations |
Chapters 1 and 2 |
|
2 |
Control flow analysis |
Chapter 7 |
|
3 |
Data-flow analysis |
Chapter 8 |
|
4 and 5 |
Traditional optimizations |
Chapters 11, 12, and 13 |
|
6 |
Traditional optimizations: loops |
Chapter 14 |
|
7 |
Traditional optimizations: procedures |
Chapter 15 |
|
8 |
Register allocation |
Chapter 16 |
|
9 |
Code scheduling |
Chapter 17 |
|
10 |
Memory optimizations |
Chapter 20 |
|
11, 12, 13 |
Modern optimizations |
TBA |