This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Extend semantic of OffsetSizeAndStrideOpInterface.
ClosedPublic

Authored by nicolasvasilache on Jan 26 2021, 6:21 AM.

Details

Summary

OffsetSizeAndStrideOpInterface now have the ability to specify only a leading subset of
offset, sizes, strides operands/attributes.
The size of that leading subset must be limited by the corresponding entry in getArrayAttrMaxRanks to avoid overflows.
Missing trailing dimensions are assumed to span the whole range (i.e. [0 .. dim)).
This brings more natural semantics to slice-like op on top of subview and is a simplifies to removing all uses of SliceOp in dependent projects.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jan 26 2021, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 6:21 AM
ftynse accepted this revision.Jan 27 2021, 12:43 AM
ftynse added inline comments.
mlir/include/mlir/Interfaces/ViewLikeInterface.td
48

It's not "exactly" anymore, is it?

mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
3359–3360

Nit: use explicit types here

mlir/test/IR/invalid-ops.mlir
962–963

Please fix this message checker.

This revision is now accepted and ready to land.Jan 27 2021, 12:43 AM
nicolasvasilache marked 3 inline comments as done.

Address review.

not an empty comment

This revision was landed with ongoing or failed builds.Jan 27 2021, 1:04 AM
This revision was automatically updated to reflect the committed changes.