Professional Documents
Culture Documents
Compiler
Compiler
Last Time
Course organization
Read Backus et al.
Today
Announcements
Lecture 1
CS 380C
Questions on course
organization?
Whats a compiler?
How does it work?
What is a compiler?
A program that translates a program in one
language to another language
The essential interface between applications &
architectures
Lecture 1
CS 380C
Lecture 1
CS 380C
Arent compilers
a solved problem?
Optimization for scalar machines is a problem
that was solved ten years ago.
David Kuck, Fall 1990
Lecture 1
CS 380C
Arent compilers
a solved problem?
Optimization for scalar machines is a problem
that was solved ten years ago.
David Kuck, Fall 1990
Lecture 1
CS 380C
Role of compilers
Bridge complexity and evolution in
architecture, languages, & applications
Help programmers with correctness,
reliability, program understanding
Compiler optimizations can significantly
improve performance
1 to 10x on conventional processors
Lecture 1
CS 380C
Optimization
What should it do?
Lecture 1
CS 380C
Optimization
What should it do?
Lecture 1
CS 380C
Analysis
Scope of program analysis
Analysis
Lecture 1
CS 380C
Example optimizations
Division of optimizations
1. Machine independent
2. Machine dependent
Faster code optimizations
common subexpression elimination
constant folding
dead code elimination
register allocation
scheduling
loop transformations
Lecture 1
CS 380C
10
Program
Structural
Scalar Memory Reg. Scheduling
inlining
cse scalar repl Alloc peephole
unrolling
constants ptrs
loop perm expressions
Lecture 1
CS 380C
Machine
code
11
Exciting times
New and changing architectures
Feedback
Programmer
Code
H/S Profiling
Compiler
Specification
Lecture 1
Code
Runtime
Future behavior
CS 380C
12
Questions?
Lecture 1
CS 380C
13
Programming Assignment #1
380C Lab 1
Due: Friday 9/11 5pm
Translate from 3 address code to C
We provide a high-level language:
Hadi will be available for Q&A Wednesday 9/2 12pm (special location).
Lecture 1
CS 380C
14
Overview
Today
Introduction to
compilers
Lecture 1
Next Time
program
representation
control flow
Read wiki--No
critique on wiki
reading!
CS 380C
15