Lecture3 - IR and Control Flow CSE 501 Lecture 3 April 6...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
IR and Control Flow CSE 501 Lecture 3 April 6, 2009
Image of page 1

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

View Full Document Right Arrow Icon
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!
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
Control Flow Basic block Straight line sequence of code Single entry point at beginning Single exit at end Control flow graph (CFG) Directed graph of basic blocks Edges represent control transfer
Image of page 4
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
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern