[<< home] [Lecture 1] [Lecture 2] [Lecture 3] [Lecture 4] |

- Review the slides here from the lecture #2 of last quarter.
- Studied paper: Dataflow Analysis of Scalar Array References, Paul Feautrier, IJPP'91.

*Note: students will present their solution for the exercices on the
whiteboard during the class.*

```
```for (i = 0; i < N; ++i)
s[i] = 0;
for (i = 1; i < N + 1; ++i)
tmp[i] = s[i - 1];

```
```for (i = 1; i < N + 1; ++i) {
s[i] = 0;
tmp[i] = s[i - 1];
}

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j)
s[j] = 0;

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j)
s[i][j] = s[i][j] + 1;

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j) {
s[i][j] = s[i][j] + 1;
a[i] += s[i][j] / b[j];
}
for (i = 0; i < N; ++i)
output += a[i];

- Review the slides here from the lecture #2 of last quarter.
- Studied paper: Dataflow Analysis of Scalar Array References, Paul Feautrier, IJPP'91.

*Note: students will present their solution for the exercices on the
whiteboard during the class.*

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j) {
s[i][j] = s[i][j] + 1;
a[i] += s[i][j] / b[j];
}
for (i = 0; i < N; ++i)
output += a[i];

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j) {
a[i] += s[i][j] / b[j]; // R
}
for (i = 0; i < N; ++i)
output += a[i]; // S

And given the schedule Theta_R = i, Theta_S = i + N. Give two detailed
solutions based on construction / emptiness test of polyhedra to check if the
transformation is legal.

- Review the slides here and here from the lecture #2 and #3 of last quarter.
- Paper: Dataflow Analysis of Scalar Array References, Paul Feautrier, IJPP'91.
- Paper: Improving Data Locality in Static Control Programs, Cedric Bastoul, 2004 (see chapter 3).

*Note: students will present their solution for the exercices on the
whiteboard during the class.*

```
```for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j) {
a[i] += s[i][j] / b[j]; // R
}
for (i = 0; i < N; ++i)
output += a[i]; // S

And given the schedule Theta_R = i, Theta_S = i + N. Give two detailed
solutions based on construction / emptiness test of polyhedra to check if the
transformation is legal.

- Paper: Scanning parameterized polyhedron using Fourier-Motzkin elimination, Marc Le Fur, Concurrency: Practice and Experience, 1996. local copy
- Paper: Scanning polyhedra with DO loops, C. Ancourt and F. Irigoin, PPoPP'91.

*The two papers referenced above must have been read and understood. students will present their solution for the exercices on the
whiteboard during the class. *

```
```##################
# >= i j N 1
##################
1 1 0 0 0
1 -1 0 1 0
1 0 1 0 0
1 0 -1 1 0

```
```##################
# >= i j N 1
##################
1 1 0 0 0
1 -1 0 1 0
1 1 1 0 0
1 0 -1 1 0

```
```#######################
# >= c1 c2 i j N 1
#######################
1 0 0 1 0 0 0
1 0 0 -1 0 1 0
1 0 0 1 1 0 0
1 0 0 0 -1 1 0
0 -1 0 1 0 0 0
0 0 -1 0 1 0 0

```
```##########################
# >= c1 c2 c3 i j N 1
##########################
1 0 0 0 1 0 0 0
1 0 0 0 -1 0 1 0
1 0 0 0 1 1 0 0
1 0 0 0 0 -1 1 0
0 -1 0 0 1 0 0 0
0 0 -1 0 0 0 0 1
0 0 0 -1 0 1 0 0