[all-commits] [llvm/llvm-project] d3cb6b: [mlir][linalg][bufferize] Rewrite conflict detection

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Oct 14 18:32:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3cb6bf2d462958f2a6573e6390cca71d13dee6b
      https://github.com/llvm/llvm-project/commit/d3cb6bf2d462958f2a6573e6390cca71d13dee6b
  Author: Matthias Springer <springerm at google.com>
  Date:   2021-10-15 (Fri, 15 Oct 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/ComprehensiveBufferize.h
    M mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir

  Log Message:
  -----------
  [mlir][linalg][bufferize] Rewrite conflict detection

For each memory read, follow SSA use-def chains to find the op that produces the data being read (i.e., the most recent write). A memory write to an alias is a conflict if it takes places after the "most recent write" but before the read.

This CL introduces two main changes:
* There is a concise definition of a conflict. Given a piece of IR with InPlaceSpec annotations and a computes alias set, it is easy to compute whether this program has a conflict. No need to consider multiple cases such as "read of operand after in-place write" etc.
* No need to check for clobbering.

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




More information about the All-commits mailing list