[mlir][bufferization] Reads from tensors with undefined data are not a conflict
authorMatthias Springer <springerm@google.com>
Mon, 6 Feb 2023 15:10:23 +0000 (16:10 +0100)
committerMatthias Springer <springerm@google.com>
Mon, 6 Feb 2023 15:11:13 +0000 (16:11 +0100)
commit1fdf06d6d79ea0ced79d680b7fcd622ef63fb9a5
treebc0662c2d414cf94cbaf03647a32443d4a50f7c6
parent77910ac374656319ff114ef251fda358d4aa166a
[mlir][bufferization] Reads from tensors with undefined data are not a conflict

Reading from tensor.empty or bufferization.alloc_tensor (without copy) cannot cause a conflict because these ops do not specify the contents of their result tensors.

Differential Revision: https://reviews.llvm.org/D143183
mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp
mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir
mlir/test/Dialect/SCF/one-shot-bufferize.mlir