OSDN Git Service

[mlir][Affine] Revisit and simplify composeAffineMapAndOperands.
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 19 Jan 2021 13:48:08 +0000 (13:48 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 19 Jan 2021 13:52:07 +0000 (13:52 +0000)
commit93a873dfc9ee7e8b4386dea87e43c5f238eeef06
tree7bbd4aa78bdf77b5550da34bdc03e50a585b556a
parentec877106a38b760229a2d676b7d2278b2bade8ab
[mlir][Affine] Revisit and simplify composeAffineMapAndOperands.

In prehistorical times, AffineApplyOp was allowed to produce multiple values.
This allowed the creation of intricate SSA use-def chains.
AffineApplyNormalizer was originally introduced as a means of reusing the AffineMap::compose method to write SSA use-def chains.
Unfortunately, symbols that were produced by an AffineApplyOp needed to be promoted to dims and reordered for the mathematical composition to be valid.

Since then, single result AffineApplyOp became the law of the land but the original assumptions were not revisited.

This revision revisits these assumptions and retires AffineApplyNormalizer.

Differential Revision: https://reviews.llvm.org/D94920
13 files changed:
mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
mlir/include/mlir/IR/AffineExpr.h
mlir/include/mlir/IR/AffineMap.h
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/Affine/IR/AffineValueMap.cpp
mlir/lib/IR/AffineExpr.cpp
mlir/lib/IR/AffineMap.cpp
mlir/test/Dialect/Affine/SuperVectorize/normalize_maps.mlir [deleted file]
mlir/test/Dialect/Affine/affine-data-copy.mlir
mlir/test/Dialect/Affine/canonicalize.mlir
mlir/test/Dialect/Linalg/reshape_fusion.mlir
mlir/test/EDSC/builder-api-test.cpp
mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp