Three types of constraints:
- Flow or True Dependence: When a variable is assigned or defined in one statement and used in subsequent statement
- Anti Dependence: When a variable is used in one statement and reassigned in subsequently executed statement
- Output Dependence: When a variable is assigned in one statement and reassigned in subsequent statement
Anti dependence and Output dependence arise from reuse of variable and are also called False dependence.
Flow dependence is inherent in computation and cannot be eliminated by renaming. Therefore it is also called True dependence.
Data Dependence Graph
Data structure used to depict dependency between statements.
- Each statement represents a node in the graph
- Nodes are connected by directed edges
- When S2 is flow dependent on S1, it is denoted by S1
S2 or S1
S2 and represented by
S1 → S2
- When there is an anti-dependence from S1 to S2, it is denoted by S1
S2 or S1
S2 and represented by
S1 → S2
- When there is an output-dependence from S1 to S2, it is denoted by S1
S2 and represented by
S1 → S2
|