step7hints

step7hints - Hints for Project Step 7 Here are a couple of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Hints for Project Step 7 Here are a couple of ideas to help you get started with project step 7. The description of the step on the project page tells you to do liveness on a per-basic-block basis. Here, I will describe an approach that calculates liveness on a per-statement basis. You can choose either approach. 1. Control flow graph. In class, we discussed how to build a control flow graph for any piece of code, including code that uses arbitrary jumps and branches. Building a CFG for Micro code is easier, as the only control flow is if statements and for statements. Your current IR probably represents the three address code as a linked list of IR instructions. You can use this linked list as a basis for a CFG—each statement represents one node in the CFG. The only modifications you need to make to this are to add additional predecessor and successor information to nodes that need it. Unconditional jumps
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2012 for the course ECE 468 taught by Professor Test during the Fall '08 term at Purdue.

Ask a homework question - tutors are online