[Mlir-commits] [mlir] [mlir][ptr] Add ConstantOp with NullAttr and AddressAttr support (PR #157347)
Fabian Mora
llvmlistbot at llvm.org
Fri Sep 12 10:33:15 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.
----------------
fabianmcg wrote:
Agreed. How about if we use a new PR for that?
My take is, while a container type (like tensor or memref) can be argued that it supports sub-byte retrieval of elements. Addresses, and therefore ptrs are always byte-aligned.
https://github.com/llvm/llvm-project/pull/157347
More information about the Mlir-commits
mailing list