This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization][NFC] Change signature of getMemRefType
ClosedPublic

Authored by springerm on Jun 21 2022, 7:00 AM.

Details

Summary

These functions now accept unsigned values for memory spaces instead of Attributes.

Depends On D128274

Diff Detail

Event Timeline

springerm created this revision.Jun 21 2022, 7:00 AM
springerm requested review of this revision.Jun 21 2022, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2022, 7:00 AM
aartbik added inline comments.Jun 22 2022, 2:18 PM
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
606

so, !hasValue() and {} are still distinct situation here I guess?

springerm added inline comments.Jun 24 2022, 4:56 AM
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
606

Correct, None means "not specified" and we do whatever the default constructor of MemRefType/UnrankedMemRefType is doing. AffineMap() or {} means identity layout.

We want to go away from affine map to specify layout (see in particular https://discourse.llvm.org/t/rfc-remove-bare-pointer-calling-convention/63419 ) and a bunch of other relates posts.
Can this PR just add the form you want for the address space?

springerm updated this revision to Diff 439964.Jun 25 2022, 2:56 AM

address comments

springerm edited the summary of this revision. (Show Details)Jun 27 2022, 12:51 AM
This revision is now accepted and ready to land.Jun 27 2022, 12:57 AM
This revision was landed with ongoing or failed builds.Jun 27 2022, 1:41 AM
This revision was automatically updated to reflect the committed changes.