Skip to content

Commit d7bf2bf

Browse files
authored
[NFC][mlir][ptr] Clarify pointer dialect semantics (#158484)
This patch adds the following description to the pointer dialect: ``` The pointer dialect provides types and operations for representing and interacting with pointer values in MLIR, such as loading and storing values from/to memory addresses. The dialect's main type is an opaque pointer (`ptr`) that can be parameterized by a memory space. This type represents a handle to an object in memory, or target-dependent values like `nullptr`. Further, the dialect assumes that the minimum addressable unit by a pointer is a byte. However, the dialect does not make assumptions about the size of a byte, which is considered a target-specific property. ```
1 parent 8007022 commit d7bf2bf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mlir/include/mlir/Dialect/Ptr/IR/PtrDialect.td

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ include "mlir/IR/OpBase.td"
2121
def Ptr_Dialect : Dialect {
2222
let name = "ptr";
2323
let summary = "Pointer dialect";
24+
let description = [{
25+
The pointer dialect provides types and operations for representing and
26+
interacting with pointer values in MLIR, such as loading and storing values
27+
from/to memory addresses.
28+
29+
The dialect's main type is an opaque pointer (`ptr`) that can be
30+
parameterized by a memory space. This type represents a handle to an object
31+
in memory, or target-dependent values like `nullptr`. Further, the dialect
32+
assumes that the minimum addressable unit by a pointer is a byte. However,
33+
the dialect does not make assumptions about the size of a byte, which is
34+
considered a target-specific property.
35+
}];
2436
let cppNamespace = "::mlir::ptr";
2537
let useDefaultTypePrinterParser = 1;
2638
let useDefaultAttributePrinterParser = 1;

0 commit comments

Comments
 (0)