[all-commits] [llvm/llvm-project] 654e8a: [MLIR] Consider AffineIfOp when getting the index ...

Ruizhe Zhao via All-commits all-commits at lists.llvm.org
Sat Aug 8 14:46:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 654e8aadfdda97524c463bcf3552d2ecf2feda93
      https://github.com/llvm/llvm-project/commit/654e8aadfdda97524c463bcf3552d2ecf2feda93
  Author: Vincent Zhao <vincentzhaorz at gmail.com>
  Date:   2020-08-09 (Sun, 09 Aug 2020)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/Utils.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/Transforms/memref-dependence-check.mlir

  Log Message:
  -----------
  [MLIR] Consider AffineIfOp when getting the index set of an Op wrapped in nested loops

This diff attempts to resolve the TODO in `getOpIndexSet` (formerly
known as `getInstIndexSet`), which states "Add support to handle IfInsts
surronding `op`".

Major changes in this diff:

1. Overload `getIndexSet`. The overloaded version considers both
`AffineForOp` and `AffineIfOp`.
2. The `getInstIndexSet` is updated accordingly: its name is changed to
`getOpIndexSet` and its implementation is based on a new API `getIVs`
instead of `getLoopIVs`.
3. Add `addAffineIfOpDomain` to `FlatAffineConstraints`, which extracts
new constraints from the integer set of `AffineIfOp` and merges it to
the current constraint system.
4. Update how a `Value` is determined as dim or symbol for
`ValuePositionMap` in `buildDimAndSymbolPositionMaps`.

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




More information about the All-commits mailing list