This is the set of expressions available before statement s
Available means the expression has been computed on every path to s and it is unchanged since last computation
Outsβ=Gensββ(InsββKillsβ)
The set of expressions available immediately after computing s which is the statement s computes minus those that have been invalidated by Killsβ
In: set of expressions available at beginning
Out: set of expressions available at end
Gen: set of expressions created in statement
Kill: set of expressions killed by assignments in stmt
Analysis with Loops and Branches
Similar to straight line analysis, we can compute the Gen and Kill sets after one step since these donβt depend on the ordering of blocks.
Now we want to define expressions for our In sets. These depend on the flow of the Control Flow of our program instead of just the Outsβ1β. It is the OutsiββOutsnβ or, the out of all program blocks that lead back to program block s.
Now we have Gen, Kill, and an expression for In. We can use the equation for Out from the straight line analysis.
Now we iterate: Out β In
Stop when another round of iterations changes nothing