The idea of this patch is to implement a mechanism of fully-indexed static expansion.
The goal of this patch is to be able to expand every memory access to a fully indexed one. For example from this original source code :
for(int i = 0; i<Ni; i++) for(int j = 0; j<Ni; j++) S: B[j] = j; T: A[i] = B[i]
After the pass, we want this :
for(int i = 0; i<Ni; i++) for(int j = 0; j<Ni; j++) S: B[i, j] = j; T: A[i] = B[i, i]
We are, for now, unable to apply expansion on some cases :
- Scalar access
- Multiple writes per SAI
- MayWrite Access
- Expansion that leads to an access to the original array
[Suggestion] To be consistent with other switches that add passes, name this -polly-enable-mse and the pass itself -polly-mse (instead of -polly-opt-mse)?