Chapter 9: Code generation

DAG representation: example

For example, the slide shows a three-address code. The corresponding DAG is shown. We observe that each node of the DAG represents a formula in terms of the leaves, that is, the values possessed by variables and constants upon entering the block. For example, the node labeled t 4 represents the formula

b[4 * i]

that is, the value of the word whose address is 4*i bytes offset from address b, which is the intended value of t 4 .