[all-commits] [llvm/llvm-project] 4cfaaa: [NFC][mlir][bufferization] Remove getMemRefType() ...
Andrei Golubev via All-commits
all-commits at lists.llvm.org
Wed Jun 3 03:13:22 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4cfaaa679114c690edec268cb53d19d198c71bc2
https://github.com/llvm/llvm-project/commit/4cfaaa679114c690edec268cb53d19d198c71bc2
Author: Andrei Golubev <andrey.golubev at intel.com>
Date: 2026-06-03 (Wed, 03 Jun 2026)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
M mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
M mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
Log Message:
-----------
[NFC][mlir][bufferization] Remove getMemRefType() helper (#199034)
Replace getMemRefType() helper with a direct usage of
options.unknownTypeConverterFn() hook. This does not change any
behaviour since all the existing call-sites would already implicitly
call the hook. The major difference could have been in the handling of
the memref layout but this does not seem to be properly handled anyhow.
As the `getMemRefType()` helper is removed, there are two cases to keep
in mind for downstream users that need to adjust the code accordingly:
1. For creating memrefs without layouts, call
`options.unknownTypeConverterFn` hook directly (the same way this patch
is doing for upstream)
2. For creating memrefs with layouts (assuming, custom ones), please
(re)implement the same helper. As only ranked memrefs can have a layout,
a call to `mlir::MemRefType::get(shape, elementType, /*your custom
layout=*/myLayout, memorySpace)` should be sufficient.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list