Computer Laboratory

Course pages 2015–16

Modern Compiler Design

Principal lecturers: Prof Alan Mycroft, Dr David Chisnall
Taken by: MPhil ACS, Part III
Code: L25
Hours: 16 (8 × two-hour seminar sessions)
Prerequisites: Undergraduate courses on C/C++ and compilers (see also “pre-course reading” below), enough practical C++ to augment a large open-source system (LLVM).

Aims

The module aims to give students practical experience with a state-of-the art compiler architecture used in research and academia. The main focus is on code generation for two categories of language: late-bound dynamic languages and parallel languages.

Syllabus

  • Static Single Assignment form and its uses [1 lecture]
  • The LLVM intermediate representation and transform pipeline [2 lectures and 2 practicals]
  • Strategies for implementing dynamic dispatch and duck typing [2 lectures and 2 practicals]
  • Autovectorisation algorithms [1 lecture and 2 practicals]
  • Optimisation constraints for GPU and heterogeneous architectures [1 lecture]
  • Parallel execution strategies [1 lecture and 2 practicals]

Objectives

On completion of this module, students should:

  • Understand the performance characteristics of modern processors
  • Be familiar with strategies for optimising dynamic dispatch for languages like JavaScript and Objective-C
  • Have experience with algorithms for automatically taking advantage of SIMD, SIMT, and MIMD parallelism

Pre-course reading

Some prior knowlege on the following compiler ideas (e.g. reading the Wikipedia articles on them) is advised:

Coursework

Write a 4,000-word project report in IEEE journal format, including results from an analysis of modern compiler optimisation techniques.

Practical work

Several short exercises implementing and benchmarking simple optimisations.

Design and implement a small set of optimisations for one of the example languages in the course or an existing language such as OpenCL C to generate experimental results. Several project ideas, including some proposed by members of ARM's compiler team, will be available to choose from or students may propose their own for this component.

Assessment

  • The 4,000-word project report will be graded (80%).
  • The ticked practical work will be reviewed with the student (a short oral) (20%)

Recommended reading

Alfred V. Aho, Monica S. Lam, Ravi Sethi and Jeffrey D. Ullman (Sep 10, 2006). Compilers: Principles, Techniques, & Tools. Addison Wesley (2nd ed.).
Steven Muchnick, (1997). Advanced Compiler Design and Implementation. Morgan Kaufmann.