[all-commits] [llvm/llvm-project] d67c4c: [mlir][Linalg] Reimplement and extend getStridesAn...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon Jan 6 06:41:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d67c4cc2eb4ddc450c886598b934c111e721ab0c
      https://github.com/llvm/llvm-project/commit/d67c4cc2eb4ddc450c886598b934c111e721ab0c
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-01-06 (Mon, 06 Jan 2020)

  Changed paths:
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/AffineOps/memref-stride-calculation.mlir

  Log Message:
  -----------
  [mlir][Linalg] Reimplement and extend getStridesAndOffset

Summary: This diff reimplements getStridesAndOffset in a significantly simpler way by operating on the AffineExpr and calling into simplifyAffineExpr instead of rolling its own saturating arithmetic.

As a consequence it becomes quite simple to extend the behavior of getStridesAndOffset to encompass more cases by manipulating the AffineExpr more directly.
The divisions are still filtered out and continue to yield fully dynamic strides.
Simplifying the divisions is left for a later time if compelling use cases arise.

Relevant tests are added.

Reviewers: ftynse

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list