Goal is to understand opportunities and techniques for compiler optimizations. Students will implement some of these as stand-alone program modules. Students will understand which optimizations are possible, which ones not, and will learn to trade cost versus benefit. At the conclusion of this course, students can fine-tune critical applications via directives. Motivated, lucky students may even implement and improve optimizations in commercial compilers.
Course outlines the various phases of an optimizer.
Time permitting, we cover interprocedural alias analysis. Strength reduction will be implemented by students through an application using conventional arithmetic operators. Operators will be eliminated or replaced by other ones with more desirable properties while preserving semantics. You'll implement the detection of strongly connected components using Tarjan's algorithm. Methods for detecting inner loops and their bodies will be discussed.