• 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
    • The set of expressions available immediately after computing s which is the statement s computes minus those that have been invalidated by
  • 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 and sets after one step since these don’t depend on the ordering of blocks.
  • Now we want to define expressions for our sets. These depend on the flow of the Control Flow of our program instead of just the . It is the or, the out of all program blocks that lead back to program block s.
  • Now we have , , and an expression for . We can use the equation for from the straight line analysis.
  • Now we iterate: Out β†’ In
  • Stop when another round of iterations changes nothing