|
Bottom up equation: |
|
Top down equation: |
Out (then) = out (if –then –else)
Out (else) = out (if-then-else) Out (if) =  |
Available Expression
- Used in detecting common subexpressions
- Expression 4*i in B3 is a common subexpression if 4*i is available the entry point of B3
- It will be available if i is not assigned a value in B2 or 4*i is re-computed after i is assigned in B2
- How to compute set of generated expressions:
- At a point prior to block no expressions are available
- If at a point p set A of expressions is available and q is a point after p with statement x:=y+z then set of expressions available at q is:
- Add to A expression y+z
- Delete from A any expression involving x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|