EJCP 2016: Research in Compilers and Introduction to Loop Transformations

Tomofumi Yuki (CR Inria)

Overview

The main goal of this course is to give some ideas about what research in compiler is about. One of the main challenges in compilers is in analyzing a program to find what to do with it to bring higher performance. In many cases, what should be done is obvious to an expert programmer. However, automating the decision process and the transformations themselves is a whole different story. Even the word "performance" is context sensitive, and can mean speed, code size, energy efficiency, and other metrics.

This course aims to illustrate these challenges and some techniques to addresses the difficulties. The main subject is parallelism and data locality; traditionally important properties of programs, now getting more and more important.

Course Outline

Part I: Compiler Research

Slides: pptx, pdf
Here is the code for the permutation example: gemm-permutation-tests.tar

Part II: Compiler Optimizations

Slides: pptx, pdf

Lab: Introduction to Loop Transformations

The lab will step through an important loop transformation, and expose some of the challenging in automating it within a compiler.

You will need the following: Lab Instructions
Lab Material

Slides: pptx, pdf

Lab Objectives and Solutions


If you are going to bring a laptop without Linux/Mac, then I advise you to prepare a virtual machine Linux environment to make things easier.
  1. Install VirtualBox
    https://www.virtualbox.org/wiki/Downloads
  2. Get Ubuntu ISO image
    http://www.ubuntu.com/download/desktop
  3. Mount the Ubuntu image to a virtual drive (Microsoft has one if you don't have virtual drives:
    http://www.microsoft.com/en-gb/download/details.aspx?id=38780)
  4. Create a new virtual machine using VirtualBox, specifying Ubuntu as the OS and following parameters:
  5. Install Ubuntu in the new VM by specifying the virtual drive with the Ubuntu image as the boot drive
  6. Ubuntu should come with gcc but you can make sure by:
    sudo apt-get install gcc