[Mlir-commits] [mlir] [mlir][ptr] Add ConstantOp with NullAttr and AddressAttr support (PR #157347)

Krzysztof Drewniak llvmlistbot at llvm.org
Fri Sep 12 11:34:21 PDT 2025


================
@@ -22,6 +22,34 @@ class Ptr_Attr<string name, string attrMnemonic,
   let mnemonic = attrMnemonic;
 }
 
+//===----------------------------------------------------------------------===//
+// AddressAttr
+//===----------------------------------------------------------------------===//
+
+def Ptr_AddressAttr : Ptr_Attr<"Address", "address", [
+    DeclareAttrInterfaceMethods<TypedAttrInterface>
+  ]> {
+  let summary = "Address attribute";
+  let description = [{
+    The `address` attribute represents a raw memory address.
----------------
krzysz00 wrote:

Agreed with that distinction. Memref/tensor are sufficiently abstract containers that element-level (and therefore sub-byte) indexing makes sense, while pointers are ... pointers.

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


More information about the Mlir-commits mailing list