# 583L8 - EECS 583 Class 8 Classic Optimization University of...

This preview shows pages 1–8. Sign up to view the full content.

EECS 583 – Class 8 Classic Optimization University of Michigan October 3, 2011

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
- 1 - Announcements & Reading Material Homework 2 » Extend LLVM LICM optimization to perform speculative LICM » Due Friday, Nov 21, midnight (3 wks!) » This homework is significantly harder than HW 1 » Best time on performance benchmarks wins prize Today‟s class » Compilers: Principles, Techniques, and Tools , A. Aho, R. Sethi, and J. Ullman, Addison-Wesley, 1988, 9.9, 10.2, 10.3, 10.7 Material for Wednesday » “Compiler Code Transformations for Superscalar-Based High- Performance Systems,” Scott Mahlke, William Chen, John Gyllenhaal, Wen-mei Hwu, Pohua Chang, and Tokuzo Kiyohara, Proceedings of Supercomputing '92 , Nov. 1992, pp. 808-817
- 2 - From Last Time: Improved Class Problem c = b + a b = a + 1 a = b * c b = c - a a = a - c c = b * c a = b = c = BB0 BB1 BB2 BB3 BB4 BB5 Rename the variables so this code is in SSA form Step 1: Dominator Tree BB0 BB1 BB2 BB3 BB4 BB5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
- 3 - From Last Time: Improved Class Problem (2) c = b + a b = a + 1 a = b * c b = c - a a = a - c c = b * c a = b = c = BB0 BB1 BB2 BB3 BB4 BB5 BB0 BB1 BB2 BB3 BB4 BB5 For each join point X in the CFG For each predecessor, Y, of X in the CFG Run up to the IDOM(X) in the dominator tree, adding X to DF(N) for each N between Y and IDOM(X) BB DF 0 - 1 - 2 4 3 4, 5 4 5 5 1 Step 2: Dominance Frontier
- 4 - From Last Time: Improved Class Problem (3) c = b + a b = a + 1 a = b * c b = c - a a = a - c c = b * c a = b = c = BB0 BB1 BB2 BB3 BB4 BB5 BB DF 0 - 1 - 2 4 3 4, 5 4 5 5 1 Step 3: Insert Phi Nodes For each global name n For each BB b in which n is defined For each BB d in b‟s dominance frontier - Insert a Phi node for n in d - Add d to n‟s list of defining BBs a = Phi(a,a) b = Phi(b,b) c = Phi(c,c) a = Phi(a,a) b = Phi(b,b) c = Phi(c,c) a = Phi(a,a) b = Phi(b,b) c = Phi(c,c) Step 4: Rename variables Do in class

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
- 5 - Code Optimization Make the code run faster on the target processor » My (Scott‟s) favorite topic !! » Other objectives: Power, code size Classes of optimization » 1. Classical (machine independent) Reducing operation count (redundancy elimination) Simplifying operations Generally good for any kind of machine » 2. Machine specific Peephole optimizations Take advantage of specialized hardware features » 3. Parallelism enhancing Increasing parallelism (ILP or TLP) Possibly increase instructions
A Tour Through the Classical Optimizations For this class – Go over concepts of a small subset of the optimizations » What it is, why its useful » When can it be applied (set of conditions that must be satisfied) » How it works

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 25

583L8 - EECS 583 Class 8 Classic Optimization University of...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online