[all-commits] [llvm/llvm-project] a14a28: [MLIR] MemRef Normalization for Dialects

Alexandre Eichenberger via All-commits all-commits at lists.llvm.org
Thu Aug 27 07:59:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a14a2805b04d49bfbbff6f79f141738c67ad14fd
      https://github.com/llvm/llvm-project/commit/a14a2805b04d49bfbbff6f79f141738c67ad14fd
  Author: Alexandre E. Eichenberger <alexe at us.ibm.com>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M mlir/docs/Traits.md
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
    M mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/Transforms/NormalizeMemRefs.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    A mlir/test/Transforms/normalize-memrefs-ops.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [MLIR] MemRef Normalization for Dialects

When dealing with dialects that will results in function calls to
external libraries, it is important to be able to handle maps as some
dialects may require mapped data.  Before this patch, the detection of
whether normalization can apply or not, operations are compared to an
explicit list of operations (`alloc`, `dealloc`, `return`) or to the
presence of specific operation interfaces (`AffineReadOpInterface`,
`AffineWriteOpInterface`, `AffineDMAStartOp`, or `AffineDMAWaitOp`).

This patch add a trait, `MemRefsNormalizable` to determine if an
operation can have its `memrefs` normalized.

This trait can be used in turn by dialects to assert that such
operations are compatible with normalization of `memrefs` with
nontrivial memory layout specification. An example is given in the
literal tests.

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




More information about the All-commits mailing list