


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of the university of michigan eecs 583: advanced compilers course. The class focuses on compiler backends, including mapping applications to processor hardware, processor independence, and creating fast and efficient machine code. Students should have a good c++ programming background, knowledge of computer architecture, and be familiar with powerpoint. The class includes lectures, homework assignments, midterm exams, research papers, presentations, and projects.
Typology: Study notes
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















Y
Programming languages (despite what the grad handbook sez) »^
Parsing, syntax checking »^
Handling advanced language features – virtual functions, … »^
Frontend transformations – array dependence analysis, … »^
Debugging »^
Simulation
Y
Mapping applications to processor hardware »^
Retargetability – work for multiple platforms (not hard coded) »^
Work at the assembly-code level^ y
Processor independent -> Machine code
»^
Speed/Efficiency^ y
How to make the application run fast y Use less memory (text, data)
Y
Y
“Compilers: Principles, Techniques, Tools”, by Aho, Sethi,Ullman (aka red dragon book) »^
“Building an Optimizing Compiler”, by Morgan
Y
Trimaran webpage: http://www.trimaran.org »^
UIUC Impact webpage: http://www.crhc.uiuc.edu/Impact
Y
Will be set up later this week »^
Lecture notes »^
Newsgroup – forum for helping each other, I will try to checkregularly
Y
2.5 hrs is WAY too much »^
We’ll go about 2 hours, with a 10 minute break at 4:30pm
Y
Text book material – basic of compiler backend techniques »^
I lecture, you guys do homeworks »^
Midterm exam
Y
Research papers »^
Discussion »^
Presentations by students – You guys are going to teach
Y
Distribution of grades, scale, etc - ??? »^
Most (hopefully all) will get A’s and B’s »^
Slackers will be obvious and will suffer »^
If you wanted a blow off class – consider dropping
Y
Midterm exam – 30% »^
Project – 35% »^
Homeworks – 20% »^
Class participation and involvement – 15%^ y
Paper presentation – 7.5% y General – 7.5%
Y
Small/modest programming assignments »^
Design and implement something we discussed in class
Y
Learn the important concepts »^
Practice for the midterm »^
Learn the compiler infrastructure so you can do the project
Y
2/1/0 (good, so-so, didn’t try very hard)
Y
Make sure you understand things or it will come back to bite you »^
For now, everyone must turn in their own assignment, maychange this later in the semester
Y
Be here »^
Don’t just stare at the wall »^
Be prepared to discuss the material »^
Have something useful to contribute
Y
Research paper presentation^ y
Put some effort into this – clear/illustrative presentation
»^
Research paper discussions – thoughts, comments, etc »^
Saying what you think in the special interest group meetings »^
Solving class problems »^
Feedback to me about the class
Y
Each group will meet every other week for 1 hr (time/place TBD) »^
Identify research papers, discuss papers and project ideas
Y
Branches/predicates »^
Instruction-level parallelism »^
Memory hierarchy »^
Power
Y
Control flow analysis / optimization »^
Dataflow analysis / optimization »^
Code generation, scheduling, register allocation »^
Memory hierarchy optimization
Y
Y
Y
Mon, Wed: before and after class »^
Y
No GSI for this class »^
You will have to be independent in this class^ y
RTFM y Come to me when you are really stuck or confused y Helping each other is encouraged
Y
Superscalar processors, do everything in hardware »^
Emphasis on Pentium class architectures
Y
Hardware people have to understand compilers^ y
No attention to compilers -> bad processor design
»^
483 material is not what real compiler people focus on^ y
Parsing, syntax checking, etc – Standard, mature field
»^
This class material is where all the action is at^ y
How to make code run fast (approach hand coding) y How to reduce power y How to reduce code size y How to make use of unusual architectural features y How to design better processors y How to design customized processors
Y
Compiler creates complete plan of run-time execution^ »
At what time and using what resource »^
POE communicated to hardware via the instruction set »^
Processor obediently follows POE »^
No dynamic scheduling, out of order execution (these second guess thecompilers plan)
Y
Compiler allowed to play the statistics^ »
Many types of info only available at run-time (branch directions,locations accessed via pointers) »^
Traditionally compilers behave conservatively
Æ
handle worst case
possibility »^
Allow the compiler to gamble when it believes the odds are in its favor^ y
Profiling
Y
Expose microarchitecture to the compiler^ »
memory system, branch execution
Y
Operations are sequential »^
Hardware figures out resource assignment, time of execution
Y
Set of independent operations that are to be issuedsimultaneously (no sequential notion within a MultiOp) »^
1 instruction issued every cycle – provides notion of time »^
Resource assignment indicated by position in MultiOp »^
POE communicated to hardware via MultiOps add
sub
load
load
store
mpy
shift
branch
Operation r1 = load(r2) r1 = load(r3) r4 = mpy(r1, r5) r4 = add(r1, r6) r7 = mpy(r4, r9) r7 = add(r7, r8)
Phase1 Operation v1 = load(r2) v2 = load(r3) v3 = mpy(r1, r5) v4 = add(r1, r6) v5 = mpy(r4, r9) v6 = add(r7, r8)
Phase2 Operation r1 = v1 r1 = v2 r4 = v4 r4 = v3 r7 = v6 r7 = v
traditional
NUAL
Assume load = 4 cycles, add = 1, mpy = 3
Y
Create more efficient POEs »^
Expose the microarchitecture »^
Play the statistics
Y
Y
Y
Y
Y