|
Data Dependence Analysis For Arrays
- Concentrate on linear subscripts:
Linear
Non-Linear
Linear & Non-Linear |
[I], [I + J − 1], [10 * I − 1, J * 2]
[I * J], [I/J], [mod(I, 2) + 1]
[IP[I] + 1]
[2 * I − 1, I * J] |
- In case of non-linear subscripts
- Ignore the subscript
- Use special solvers(very little work available)
Building Dependence Systems
- Form dependence equations
- Unknowns are loop induction variables
- Coefficients are compile time constants
- One coefficient for each loop induction variable plus a constant coefficient
- Generally use induction variable corresponding to normalized or semi normalized loops.
indicates a definition
indicates a use
- Express dependence equation as a matrix notation
AI = C
where A: Coefficient matrix; I: Vector of unknowns C: Constant vector
If there is no solution, there can be no dependence. |