[Mlir-commits] [mlir] eda4640 - [mlir][memref] Clarify the documentation for memref.clone [NFC]

Stephan Herhut llvmlistbot at llvm.org
Mon Jul 19 04:30:20 PDT 2021


Author: Stephan Herhut
Date: 2021-07-19T13:30:02+02:00
New Revision: eda46404cd79f2b8893fb1fb111be074d834ba42

URL: https://github.com/llvm/llvm-project/commit/eda46404cd79f2b8893fb1fb111be074d834ba42
DIFF: https://github.com/llvm/llvm-project/commit/eda46404cd79f2b8893fb1fb111be074d834ba42.diff

LOG: [mlir][memref] Clarify the documentation for memref.clone [NFC]

The wording was wrong and suggested that operands to memref.clone may not be mutated.

Differential Revision: https://reviews.llvm.org/D106258

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index 3385a7e8e78c7..5101d59303158 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -425,8 +425,10 @@ def CloneOp : MemRef_Op<"clone", [
     %arg1 = memref.clone %arg0 : memref<?xf32> to memref<?xf32>
     ```
 
-    Note, that mutating the source or result of the clone operation leads to
-    undefined behavior.
+    Valid implementations of this operation may alias the input and output
+    views or create an actual copy. Mutating the source or result
+    of the clone operation after the clone operation thus leads to undefined
+    behavior.
   }];
 
   let arguments = (ins Arg<AnyRankedOrUnrankedMemRef, "", []>:$input);


        


More information about the Mlir-commits mailing list