lec24mod - CS415 Compilers Optimizations These slides are...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CS415 Compilers Optimizations These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University
Background image of page 1

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

View Full DocumentRight Arrow Icon
Lecture 24 2 cs415, spring 10 Project extension? read submission procedure carefully; credit reductions if you do not follow these procedures Wednesday, May 12, noon – 3:00pm, in this classroom, closed book/notes Recitation session: Monday, 11:00am? Final Road Map
Background image of page 2
Lecture 24 3 cs415, spring 10 ± tries to improve quality of code (may fail in some cases) ± optimizer typically consists of multiple passes ± different optimization (code improvement) objectives: • execution time reduction • reduction in resource requirements (memory, registers) • (peak) power and energy reduction ± criteria for effectiveness of optimizations safety - program semantics must be preserved • opportunity - how often can it be applied? • profitability - how much improvement? Compiler Optimization
Background image of page 3

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

View Full DocumentRight Arrow Icon
Lecture 24 4 cs415, spring 10 addr[a] -, t1 *, t2 [ ], t3 i 4 4. t1 = addr(a)- 4 5. t2 = i * 4 6. t3 = t1[t2] . . . Basic Block DAG Construction Optimization: Local Common Subexpression Elimination (CSE) Source code: a(i) * a(i) a(i)
Background image of page 4
Lecture 24 5 cs415, spring 10 addr[a] -, t1, t4 *, t2, t5 [ ], t3, t6 i 4 4. t1 = addr(a)- 4 5. t2 = i * 4 6. t3 = t1[t2] 7. t4 = addr(a)- 4 8. t5 = i * 4 9. t6 = t4[t5] 10. t7 = t3 * t6 . . . *, t7 Basic Block DAG Construction a(i) * a(i)
Background image of page 5

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

View Full DocumentRight Arrow Icon
Lecture 24 6 cs415, spring 10 t1 = addr[a]-4 t2 = i * 4 t3 = t1[t2] t7 = t3 * t3 addr[a] -, t1, t4 *, t2, t5 [ ], t3, t6
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/29/2010 for the course CS 198:415 taught by Professor Kremer,u. during the Spring '10 term at Rutgers.

Page1 / 21

lec24mod - CS415 Compilers Optimizations These slides are...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online