CS 410 OPT - Fall 1999

Compiler Optimization

Thursdays, 18:20 - 22:00 CIN 92, 5th Av. Cinema

No class 11/25/99

Next class: Sat 12/4/99 10:00 - 12:30 in my office.



  Course Description

Prerequisites
Goal
Outline




Prerequisites for CS 410 OPT (Compiler Optimization):


Students must have considerable programming experience in a higher-level language, preferably C/C++, and be comfortable with assembly language. Understanding recursion, high-level data structures, dynamic memory allocation, and processor architecture is required. Highly desirable that student has mastered a Compiler Construction course such as CS 301/302 or equivalent.

Goal:
Goal is to understand opportunities and techniques for compiler optimizations. Students will implement some of these as stand-alone program modules. Optimizations discussed include conventional methods of code emission for uni-processor targets, as well as code generation for multi-processor architectures.

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.

Outline:
Course outlines the various phases of an optimizer. Optimizations and techniques discussed include strength reduction, dominator trees, induction variable (IV) elimination, basic block (BB) analysis, building control-flow graphs (cfg) of basic blocks, flow-analysis, data-dependence analysis, dd graphs, strongly connected components, Diophantine Equations and the separability test. 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.

For multi-processor targets we discuss and implement by hand software-pipelined loops for VLIW architectures. Students will become familiar with data-dependence analysis and implement a stand-alone version of the strong separability test.

Time permitting and if suitable commercial optimizers are available, students conduct timing profiles of compute-intensive matrix operations to quantify the effectiveness of various optimizations, with specific emphasis on the impact of the target processor's cache. We'll discuss and measure the impact of the second-level cache in an MP system.


 

Course Handouts


Handout 1: General info
Handout 2: Lit
Lecture Note: Basic Blocks
Lecture Note: cfg
Lecture Note: scc
Lecture Note: SW pipe
Lecture Note: Data Dependence Analysis
Homework 1
Homework 2
Homework 3
Homework 4
Homework 5
Homework 6
Midterm Exam



This page created by Herb Mayer
Last update: 9/28/1999.