[all-commits] [llvm/llvm-project] d00f56: [mlir] Add a simplifying wrapper for generateCopy ...

Tim Shen via All-commits all-commits at lists.llvm.org
Wed Mar 11 16:23:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d00f5632f39e101b1679ef887b03c566c4400d19
      https://github.com/llvm/llvm-project/commit/d00f5632f39e101b1679ef887b03c566c4400d19
  Author: Tim Shen <timshen at google.com>
  Date:   2020-03-11 (Wed, 11 Mar 2020)

  Changed paths:
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/Transforms/affine-data-copy.mlir
    M mlir/test/lib/Transforms/TestAffineDataCopy.cpp

  Log Message:
  -----------
  [mlir] Add a simplifying wrapper for generateCopy and expose it.

Summary:
affineDataCopyGenerate is a monolithinc function that
combines several steps for good reasons, but it makes customizing
the behaivor even harder. The major two steps by affineDataCopyGenerate are:
a) Identify interesting memrefs and collect their uses.
b) Create new buffers to forward these uses.

Step (a) actually has requires tremendous customization options. One could see
that from the recently added filterMemRef parameter.

This patch adds a function that only does (b), in the hope that (a)
can be directly implemented by the callers. In fact, (a) is quite
simple if the caller has only one buffer to consider, or even one use.

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




More information about the All-commits mailing list