Simone Campanoni

Tenure-track assistant professor
Department of Computer Science at Northwestern University

Simone Campanoni

Department of Computer Science
Northwestern University

CS 323: Code Analysis and Transformation

Description

Fast, highly sophisticated code analysis and code transformation tools are essential for modern software development. Before releasing its mobile apps, Facebook submits them to a tool called Infer that finds bugs by static analysis, i.e., without even having to run the code, and guides developers in fixing them. Google Chrome and Mozilla Firefox analyze and optimize JavaScript code to make browsers acceptably responsive. Performance-critical systems and application software would be impossible to build and evolve without compilers that derive highly optimized machine code from high-level source code that humans can understand. Understanding what modern code analysis and transformation techniques can and can't do is a prerequisite for research on both software engineering and computer architecture since hardware relies on software to realize its potential. In this class, you will learn the fundamentals of code analysis and transformation, and you will apply them by extending LLVM, a compiler framework now in production use by Apple, Adobe, Intel and other industrial and academic enterprises.

Syllabus
Department page

Material

This class takes materials from three different books (listed in the syllabus) as well as a few research papers. The result is a set of slides, notes, and code.
You can download the template to use for your LLVM middle-end passes here.
All the slides used in the 2019-2020 class are below. The rest of the material is available only on Canvas.
Finally, some lectures rely on code and notes (not slides).
Week number First lecture Second lecture
Week 0 Welcome Introduction to LLVM
Week 1 Control Flow Analysis CFA in LLVM
Week 2 Data Flow Analysis Static Single Assignment form
Week 3 Data Flow Analysis and their uses Foundations of Data Flow Analysis
Week 4 Dependences Dependences
Week 5 Memory alias analysis Introduction to inter-procedural CAT
Week 6 Inter-procedural CAT Inter-procedural analysis example: VLLPA
Week 7 Introduction to loops Loops
Week 8 Introduction to loop transformations Loop transformations
Week 9 State-of-the-art CAT Competition

Hall of Fame

Students extend the industrial-strength compiler clang using their own advanced code analyses and transformations developed during this class. At the end of the class, the resulting compilers compete and the names of the students that designed and built the best compilers are reported below.
Year Name Picture
2019 - 2020 Gaurav Chaudhary Hall of fame 2019
2018 - 2019 Vijay Kandiah Hall of fame 2018
2017 - 2018 Angelo Matni Hall of fame 2017

External links:
LinkedIn profile LinkedIn Follow SimoneCampanoni on Twitter Twitter GitHub profile GitHub

Share this page with: