Simone Campanoni

Tenure-track assistant professor
Department of Electrical Engineering and Computer Science
Northwestern University

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

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. Some lectures rely on code and notes (not slides). Next you can find only slides; the rest of the material is available only on Canvas.
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 reporeted below.
Year Name
2017 Angelo Matni Hall of fame 2017

LinkedIn profileLinkedIn Follow SimoneCampanoni on TwitterTwitter