Special Topics in Software Engineering:

Dynamic Compilation and Run-time Optimization in Virtual Machines

339.342 1KV Leopoldseder, Wirth Room: TBA Dates: 08.6.2018

Overview

This course discusses state-of-the-art dynamic compilation techniques. The first part of this course includes the following topics:

  • Intermediate Representations of Optimizing Compilers: We discuss common IRs in optimizing compilers, including CFG, Sea of nodes, Graal IR, and ASTs.
  • Profile Information: We discuss how dynamic compilers collect information about a running program and how this information is used to optimize it. Topics include type profiling, value profiling, branch profiling, ...
  • Deoptimization: We discuss how dynamic compilers can make speculative assumptions about a running program execution and what deoptimization is.
  • Inline caches: We will discuss what monomorphic, polymorphic, and megamorphic call sites are and discuss (polymorphic) inline caches as an optimization.
  • and many more ....
The second part of this course shows how these dynamic compilation techniques are applied in practice. We will use the Graal/Truffle system as a case study, which is developed by Oracle Labs, in cooperation with the SSW.

Truffle is a platform for implementing high-performance language implementations in Java. There are many language implementations available; including JavaScript, Ruby, R, and also C. Truffle language implementations are abstract syntax tree (AST) interpreters, running on top of a Java Virtual Machine (the Graal VM). Source code is compiled to an AST, which is then dynamically executed by the Truffle framework.
Participants will learn how they can generate a high-performant compiler for a language based on this system, by implementing a simple AST interpreter.

Grading

There will be an oral exam about the topics as discussed in the first part.

Dates

Date Time Room
Fr, 8.6.2018 13:45 - 17:00HS 14
Fr, 15.6.2018 13:45 - 17:00HS 14

Online Resources