Module 14: Approaches to Control Flow Analysis
  Lecture 28: Structural Analysis
 

Improper Intervals

Dataflow Analysis

  • Provide info about how a program segment manipulates data
  • Analysis must be conservative and aggressive
  • Collect information for optimization
    • Reaching definition
    • Available expression
    • Live variable
    • Busy expression

Reaching Definition : A definition d reaches a point p if there is a path from d to p and d is not killed on the path
Available Expression : An expression X+Y is available at point p if every path to p evaluates X+Y and after the last such evaluation no assignment to X or Y
Live Variable : For a variable X and point p whether value of X at p can be used along some path starting from p. If yes X is live at p else X is dead at p
Busy Expression : An expression B op C is busy at point p if along every path from p we come to computation B op C before any definition of B or C

Typical Equation

out(S) = gen(S) [ in(S) − kill(S)
Gen : definitions generated
Kill : definitions killed
In : input definitions
Out : output definitions

Reaching Definitions

Unambiguous Definitions :
Assignments
Ambiguous Definitions : –procedure call with
X as var parameter
–procedure that can
access X
–pointer *q = y