Encoding of loop-carried dependencies without memref

Hello, I’d like to know if it’s possible to encode the following C function without resorting to loads and stores to memref objects:

int f(int x) {
for(int i = 0 to 100)
x = x + i ;
return x;

Not in the affine dialect, but only in the loop dialect. In the former, you’ll have to use single elt memrefs as you state.

1 Like