[Mlir-commits] [mlir] [mlir][bufferization] Support custom types (1/N) (PR #142986)

Matthias Springer llvmlistbot at llvm.org
Wed Jun 18 00:26:37 PDT 2025


================
@@ -738,6 +740,14 @@ AliasingValueList unknownGetAliasingValues(OpOperand &opOperand);
 /// This is the default implementation of
 /// BufferizableOpInterface::hasTensorSemantics
 bool defaultHasTensorSemantics(Operation *op);
+
+/// This is a helper function used when buffer type is guaranteed to be memref.
+FailureOr<BaseMemRefType> castToMemRef(FailureOr<BufferLikeType> bufferType);
----------------
matthias-springer wrote:

nit: Can you rename this to `asMemRefType`? The term "cast" is overloaded, it could refer to `memref.cast`. Let's also document the exact behavior of the function: failure -> failure.

https://github.com/llvm/llvm-project/pull/142986


More information about the Mlir-commits mailing list