You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can sucessfully delinearize this piece of code:
A[][dim_size];
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[i][j]
AddRec: {{%A,+,(4 * %dim_size)}<%loop.i>,+,4}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][%dim_size] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,1}<%loop.j>]
but fail for:
A[][dim_size];
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[j][i]
AddRec: {{%A,+,4}<%loop.i>,+,(4 * %dim_size)}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][1] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,%dim_size}<%loop.j>]
The text was updated successfully, but these errors were encountered:
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[j][i]
AddRec: {{%A,+,4}<%loop.i>,+,(4 * %dim_size)}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][1] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,%dim_size}<%loop.j>]
This is a correct delinearization, although it is not a very useful one:
the size of the inner dimension is 1: ArrayDecl[UnknownSize][1]
the stride of the inner dimension is parametric: [{0,+,%dim_size}<%loop.j>]
I think we should be able to modify SCEV->delinearize to "prefer" a non
parametric strides, and that would also solve the strange dimension size "1".
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[j][i]
AddRec: {{%A,+,4}<%loop.i>,+,(4 * %dim_size)}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][1] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,%dim_size}<%loop.j>]
This is a correct delinearization, although it is not a very useful one:
the size of the inner dimension is 1: ArrayDecl[UnknownSize][1]
the stride of the inner dimension is parametric: [{0,+,%dim_size}<%loop.j>]
I think we should be able to modify SCEV->delinearize to "prefer" a non
parametric strides, and that would also solve the strange dimension size "1".
Yes, non parametric strides should be preferred. With this stride, we can not really do a lot.
Extended Description
We can sucessfully delinearize this piece of code:
A[][dim_size];
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[i][j]
AddRec: {{%A,+,(4 * %dim_size)}<%loop.i>,+,4}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][%dim_size] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,1}<%loop.j>]
but fail for:
A[][dim_size];
for (i = 0; i < n; i++)_
for (j = 0; j < n; j++)
A[j][i]
AddRec: {{%A,+,4}<%loop.i>,+,(4 * %dim_size)}<%loop.j>
Base offset: %A
ArrayDecl[UnknownSize][1] with elements of 4 bytes.
ArrayRef[{0,+,1}<%loop.i>][{0,+,%dim_size}<%loop.j>]
The text was updated successfully, but these errors were encountered: