Issues with memref operations

I don’t think it adds offset.

memref.view was originally intended to create views with a specific elemental type from an allocation that always produces a memref of i8, memref.subview was originally intended to take strided views of the view produced by memref.view and cannot change elemental types.

The separate offset field, in particular its static representation, was intended for aliasing analysis. Same as the separation of view/subview to indicate strict aliasing. I don’t think the analysis has materialized, but other additions to the memref dialect may have rendered the distinction moot. I remember considering removal of the offset field from the descriptor, but every time I found a way to convince myself it was still necessary. (However, we could replace the “allocated” pointer with another offset between the aligned and allocated pointer to avoid the weird situation with noalias between memrefs).