[all-commits] [llvm/llvm-project] 4ef602: [mlir][bufferization] Allow to_memref ops in One-S...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Jun 20 23:46:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ef60283403f8277ff1048de5905af99fd2ed81d
      https://github.com/llvm/llvm-project/commit/4ef60283403f8277ff1048de5905af99fd2ed81d
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-06-21 (Wed, 21 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
    M mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize.mlir

  Log Message:
  -----------
  [mlir][bufferization] Allow to_memref ops in One-Shot Analysis

bufferization.to_memref ops are allowed in One-Shot Bufferize, but they are treated conservatively: in the absence of a memref analysis, we have to assume that the result buffer is read and written.

Note: to_memref cannot introduce any future aliases that would have to be considered during One-Shot Bufferize, because only to_tensor ops with the `restrict` attribute are supported. Such tensors are guaranteed to not alias with any other buffer after bufferization.

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




More information about the All-commits mailing list