[Mlir-commits] [mlir] [mlir][bufferization] Return BufferLikeType in BufferizableOpInterface (PR #144867)
Andrei Golubev
llvmlistbot at llvm.org
Mon Jun 30 04:56:38 PDT 2025
================
@@ -3606,4 +3606,57 @@ def TestDummyMemrefOp : TEST_Op<"dummy_memref_op", []> {
);
}
+def TestCreateTensorOp : TEST_Op<"create_tensor_op", [BufferizableOpInterface]> {
+ let arguments = (ins);
+ let results = (outs Arg<TestTensorType>:$output);
+ let extraClassDeclaration = [{
+ // BufferizableOpInterface
+ bool bufferizesToMemoryRead(mlir::OpOperand&,
+ const mlir::bufferization::AnalysisState&);
+
+ bool bufferizesToMemoryWrite(mlir::OpOperand&,
+ const mlir::bufferization::AnalysisState&);
+
+ bool bufferizesToAllocation(mlir::Value value);
+
+ mlir::bufferization::AliasingValueList getAliasingValues(mlir::OpOperand&,
----------------
andrey-golubev wrote:
good point, done.
https://github.com/llvm/llvm-project/pull/144867
More information about the Mlir-commits
mailing list