1 Advanced Compiler Design Let's look at a compiler Let's look at a ...

4 downloads 289 Views 150KB Size Report
1. Advanced Compiler Design. CSE 231. Instructor: Sorin Lerner. Let's look at a compiler if (…) { x := …;. } else { y := …;. } …;. Exec. Compiler. Parser. Code. Gen.
Let’s look at a compiler

Advanced Compiler Design

Compiler if (…) { x := …; } else { Parser y := …; } …;

Optimizer Compiler

Code Exec Gen

CSE 231 Instructor: Sorin Lerner

Let’s look at a compiler

Compiler Parser

Optimizer

Code Gen

Advanced Optimizer Design CSE 231 Instructor: Sorin Lerner

What does an optimizer do?

What do these tools have in common? • Bug finders • Program verifiers

Compiler Parser

Optimizer

Code Gen

• Code refactoring tools • Garbage collectors • Runtime monitoring system

1. Compute information about a program 2. Use that information to perform program transformations

• And… optimizers

(with the goal of improving some metric, e.g. performance)

1

What do these tools have in common? • Bug finders • Program verifiers • Code refactoring tools

Program Analyses, Transformations, and Applications

• Garbage collectors • Runtime monitoring system • And… optimizers

CSE 231 Instructor: Sorin Lerner

They all analyze and transform programs We will learn about the techniques underlying all these tools

Course goals

Course topics

• Understand basic techniques

• Representing programs

– cornerstone of a variety of program analysis tools – useful no matter what your future path

• Analyzing and transforming programs • Get a feel for compiler research/implementation – useful if you don’t have a research area picked – also useful if you have a research area picked

• Applications of these techniques

2