[Mlir-commits] [mlir] [mlir][core|ptr] Add `PtrLikeTypeInterface` and casting ops to the `ptr` dialect (PR #137469)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Thu Jun 5 14:02:35 PDT 2025
================
@@ -110,6 +110,55 @@ def MemRefElementTypeInterface : TypeInterface<"MemRefElementTypeInterface"> {
}];
}
+//===----------------------------------------------------------------------===//
+// PtrLikeTypeInterface
+//===----------------------------------------------------------------------===//
+
+def PtrLikeTypeInterface : TypeInterface<"PtrLikeTypeInterface"> {
+ let cppNamespace = "::mlir";
+ let description = [{
+ A ptr-like type represents an object storing a memory address. This object
+ is constituted by:
+ - A memory address called the base pointer. The base pointer is an
+ indivisible object.
----------------
ftynse wrote:
Nit about "indivisible": does this intend to be the same concept as we used for vector types? (So we can use ptr in vectors?). If so, I'd ensure the same term is used in both places and we refer one from another.
It may also be worth explaining that indivisibility is conceptual for the purpose of reasoning about the program, or something along those lines. Fat pointers, bit-stealing and stuff...
https://github.com/llvm/llvm-project/pull/137469
More information about the Mlir-commits
mailing list