[Mlir-commits] [mlir] [NFC][mlir][bufferization] Remove getMemRefType() helper (PR #199034)
Matthias Springer
llvmlistbot at llvm.org
Wed Jun 3 02:03:07 PDT 2026
================
@@ -1006,7 +983,7 @@ FailureOr<BufferLikeType> bufferization::detail::defaultGetBufferType(
return op->emitError("could not infer memory space");
return cast<BufferLikeType>(
- getMemRefType(tensorType, options, /*layout=*/{}, *memSpace));
+ options.unknownTypeConverterFn(tensorType, *memSpace, options));
----------------
matthias-springer wrote:
Let's update this function:
```
/// Default unknown type converter: Use a fully dynamic layout map.
BaseMemRefType
defaultUnknownTypeConverter(TensorType tensorType, Attribute memorySpace,
const BufferizationOptions &options) {
return getMemRefTypeWithFullyDynamicLayout(tensorType, memorySpace);
}
```
It should return an unranked memref if the tensor is unranked.
Same for this in `Bufferize.cpp`:
```
opt.unknownTypeConverterFn = [=](TensorType tensorType,
Attribute memorySpace,
const BufferizationOptions &options) {
```
https://github.com/llvm/llvm-project/pull/199034
More information about the Mlir-commits
mailing list