[Mlir-commits] [mlir] [mlir][bufferization] Add tensor-like and memref-like interfaces (PR #134220)
Andrei Golubev
llvmlistbot at llvm.org
Mon Apr 7 01:42:34 PDT 2025
================
@@ -0,0 +1,51 @@
+//===- BufferizationTypeInterfaces.td - Bufferization type interfaces -*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------------------===//
+//
+// This is the definition file for type interfaces used in Bufferization.
+//
+//===---------------------------------------------------------------------------------===//
+
+#ifndef BUFFERIZATION_TYPE_INTERFACES
+#define BUFFERIZATION_TYPE_INTERFACES
+
+include "mlir/IR/OpBase.td"
+include "mlir/IR/BuiltinTypeInterfaces.td"
+
+def Bufferization_TensorLikeTypeInterface
+ : TypeInterface<"TensorLikeType", [ShapedTypeInterface]> {
----------------
andrey-golubev wrote:
I think I only saw the shaped type APIs around here (note NDEBUG): https://github.com/llvm/llvm-project/blob/4a425a4966d6421674d4300e32b0eb57ebade65a/mlir/include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h#L88-L99
> Are there any places where you'd have to insert explicit casts because of this today?
I don't think I can see such places (well, maybe in the user code but then those places are likely to cast down to the actual type so kind of not an issue).
https://github.com/llvm/llvm-project/pull/134220
More information about the Mlir-commits
mailing list