Skip to content
0:00 / 0:00

#compilerarchitecture#ast#optimizations

Compiling is like skiing: the art of compiler architecture

Paul Kelly

408 subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Paul Kelly, Professor at Imperial College London

Intermediate. Assumes working knowledge.

1.8K views5 years ago2 recommendations

Systems programmingProgramming languagesCompilers and interpretersPerformance and optimization

Paul Kelly introduces compiler architecture using a skiing metaphor to explain how compilers accumulate information and automate complex optimizations.

This short lecture accompanies my lectures on Compilers for second-year students at Imperial College London. It introduces the main general theme of my research work: the design of software tools to generate programs, by automating optimisations that would be hard to write by hand. When we get this right, we can simultaneously raise the level of abstraction and simplicity for users, and also achieve higher performance than you might reasonably get by coding at a lower level. If you find this interesting, more detailed talks can be found at wp.doc.ic.ac.uk/spo/talks-slides-videos/ . The main software projects I am referring to are Firedrake (firedrakeproject.org/ ) and Devito (devitoproject.org/ ).

Why it's here

2 people recommend this

What people say. Recommended for its great skiing metaphor that highlights the big picture of compiler architecture and AST optimizations.

u/mttdin r/Compilers • Recommends

Compiling is like skiing: the art of compiler architecture

u/cxzukin r/ProgrammingLanguages • Recommends

On “Are there optimizations that can only be performed on the AST?”

Hi Chri4, The short answer is no - there are no optimizations that can be performed on the AST that can't be performed later on. Lets dig a bit deeper. Paul Kelly's skiing metaphor is great at highlighting the big picture. At each stage of the compiler, we're accumulating more information, this accumulation can result in a central structure. E.g. AST hold syntax information, then we potentially gather type information into a symbol table, then expression information into an IR, then value information. Optimisations work at a given level of information. E.g. Common Subexpression Elimination on expressions. Global Value Numbering on values. But these overlap - They can capture the same tr…