# Program Optimization

### Dr. Peter Lammich, Wintersemester 2016/17

- Module: IN2053
- Lectures and Rooms: Wednesday, 10:15-11:45 and Thursday, 10:15-11:45 MI 00.13.009A
- Tutorials: Friday, 8:30-10:00 in MI 00.13.009A
- Start: October 20
- Tutors: Ralf Vogler

### News

- First lecture on October 20.
- Preliminary slides for week 43 online

### About the course

The lecture is meant for students in their Hauptstudium or in their Master studies who are interested in compiler technology. The lecture is part of practical computer science. Programs which we write should be both efficient and easily to maintain. In particular, maintainability means that programs should be well-structured and easily understandable also by humans. Being well-structured and easily readable, though, may often come at the price oft a degradation in efficiency at run-time. For this reason, most compilers offer an optimization phase in which the source program is analyzed and where various transformations are applied to automatically improve efficiency. In some cases, it may happen that the attempt for improvement overshoots the target and results in programs which are perhaps fast but are no longer equivalent to the original program. In the lecture, we give an overview over standard techniques for improving the quality of the generated code. In particular, we are interested in methods which guarantee that the resulting code still is equivalent to the source program.### Homework and Tutorials

We will publish homework assignments on Friday afternoon. They have to be handed in via Moodle until the next Friday, 8:30am. If you have handwritten solutions, submit a scan.Homework will be corrected and returned in the Tutorials. Gaining at least 50% of the reachable homework points will improve your final grade by one step (0.3 or 0.4), provided you pass the final exam on your first attempt.

### Slides

The slides of the lecture are available online, and will be continuously updated. There is also a printable version. (Prototype, not everything looks as good as it could)### Slides of WS 14/15

Here are the slides of the lecture from WS14/15, which I will use as a basis for this semester's lecture.### Exam

There will be a written exam on Feb 21, 2017, from 13:30 to 15:00.### Literature:

- Seidl, Wilhelm, Hack: Übersetzerbau: Analyse und Transformation, Springer, 2010
- Seidl, Wilhelm, Hack: Compiler Design: Analysis and Transformation. Springer, 2012
- Muchnick: Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997
- Wilhelm, Maurer: Übersetzerbau. Theorie, Konstruktion, Generierung. Springer, 1992
- Nielson, Nielson, Hankin: Principles of Program Analysis. Springer, 2005
- Knoop: Optimal interprocedural program optimization: A new framework and its application. Springer, 1998