[PATCH] D141662: [MLIR][memref] Add details on the semantic of reinterpret_cast
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 02:19:07 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGacae85bd4e1e: [mlir][memref] Add details on the semantic of reinterpret_cast (authored by qcolombet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141662/new/
https://reviews.llvm.org/D141662
Files:
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
Index: mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
===================================================================
--- mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -1246,6 +1246,24 @@
strides: [%stride0, %stride1]
: memref<*xf32> to memref<?x?xf32, strided<[?, ?], offset: ?>>
```
+
+ This operation creates a new memref descriptor using the base of the
+ source and applying the input arguments to the other metadata.
+ In other words:
+ ```mlir
+ %dst = memref.reinterpret_cast %src to
+ offset: [%offset],
+ sizes: [%sizes],
+ strides: [%strides]
+ ```
+ means that `%dst`'s descriptor will be:
+ ```mlir
+ %dst.base = %src.base
+ %dst.aligned = %src.aligned
+ %dst.offset = %offset
+ %dst.sizes = %sizes
+ %dst.strides = %strides
+ ```
}];
let arguments = (ins Arg<AnyRankedOrUnrankedMemRef, "", []>:$source,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141662.488915.patch
Type: text/x-patch
Size: 964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230113/ecef0d26/attachment.bin>
More information about the llvm-commits
mailing list