[all-commits] [llvm/llvm-project] 54fafd: [mlir][Linalg] Introduce canonicalization to remov...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Aug 6 03:14:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 54fafd17a728f3dd33b3cf999b6dfd3cd1d49f12
      https://github.com/llvm/llvm-project/commit/54fafd17a728f3dd33b3cf999b6dfd3cd1d49f12
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-08-06 (Thu, 06 Aug 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/Dialect/Linalg/canonicalize.mlir

  Log Message:
  -----------
  [mlir][Linalg] Introduce canonicalization to remove dead LinalgOps

When any of the memrefs in a structured linalg op has a zero dimension, it becomes dead.
This is consistent with the fact that linalg ops deduce their loop bounds from their operands.

Note however that this is not the case for the `tensor<0xelt_type>` which is a special convention
that must be lowered away into either `memref<elt_type>` or just `elt_type` before this
canonicalization can kick in.

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




More information about the All-commits mailing list