This preview shows pages 1–6. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: IR and Control Flow CSE 501 Lecture 3 April 6, 2009 Critiques • Due at the beginning of lecture • A Simple, Fast Dominance Algorithm . Cooper, Harvey, and Kennedy • Finding Dominators in Practice . Georgiadis, Tarjan, and Werneck • Homework 0: Due tonight at 11:59pm. • Homework 1: On website. • Class discussion board: please use! What does this do? instr 1: enter 0 instr 2: br [4] instr 3: enter 0 instr 4: cmpeq n#24 0 instr 5: blbc (4) [8] instr 6: write m#16 instr 7: ret 16 instr 8: mul n#24 m#16 instr 9: sub n#24 1 instr 10: param (9) instr 11: param (8) instr 12: mod (9) 2 instr 13: cmpeq (12) 0 instr 14: blbc (13) [17] instr 15: call [1] instr 16: ret 16 instr 17: call [3] instr 18: ret 16 instr 19: entrypc instr 20: enter 0 instr 21: param 5 instr 22: param 1 instr 23: call [1] instr 24: ret 0 Control Flow • Basic block • Straight line sequence of code • Single entry point at beginning • Single exit at end • Control ¡ow graph (CFG) • Directed graph of basic blocks • Edges represent control transfer Basic Blocks instr 1: enter 0 instr 2: br [4] instr 3: enter 0 instr 4: cmpeq n#24 0 instr 5: blbc (4) [8] instr 6: write m#16 instr 7: ret 16 instr 8: mul n#24 m#16 instr 9: sub n#24 1 instr 10: param (9)...
View
Full
Document
This note was uploaded on 02/09/2012 for the course CSE 403 taught by Professor Staff during the Spring '08 term at University of Washington.
 Spring '08
 Staff

Click to edit the document details