The Magic Behind Optimizing Compilers: Static Program Analysis

Speaker: Philipp Dominik Schubert

Audience level: [ Beginner | Intermediate ]

Optimizing compilers are awesome for sure. But how do they actually get all the information required to perform those mind-boggling optimizations? And how useful are constexpr and noexcept--do developers know better than the compiler?

This talk presents the basics of static program analysis and shows what goes on behind the scences of optimizing compilers. Starting from well-known static analysis frameworks--that any skilled C++ developer can implement on a rainy weekend, this talk walks you through more and more sophisticated analysis techniques and presents the current challenges that the program analysis and the compiler community face.

While presenting the necessary theory, this talk will put emphasis on presenting hands-on examples. The examples and compiler internals will be drawn from Clang/LLVM. At the end of this talk, you will (i) have a better understanding of what the compiler can and cannot know, allowing you to write more effective code, and (ii) be able to implement your own compiler analysis and optimization passes in LLVM.