Department of Computer Science and Technology

Course pages 2017–18

Modern Compiler Design

Principal lecturer: Dr David Chisnall
Additional lecturer: Dr Timothy Griffin
Taken by: MPhil ACS, Part III
Code: L25
Hours: 16 (8 × two-hour seminar sessions)
Prerequisites: Undergraduate compilers course. Some assembly language programming for a RISC-like architecture would be helpful. Students will be expected to have a working knowledge of C++ and students who have no experience with the language should expect to spend some time with a C++ tutorial before or during the course.

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.