[mlir][Analysis][NFC] Split FlatAffineValueConstraints into multiple classes
authorMatthias Springer <me@m-sp.org>
Thu, 23 Mar 2023 08:25:01 +0000 (09:25 +0100)
committerMatthias Springer <me@m-sp.org>
Thu, 23 Mar 2023 08:38:12 +0000 (09:38 +0100)
commit5b0055a4ae8d27bf2a8db903eed22ff642fc27c3
tree8dfc69bb4344b5d268eeb1f51bd0b1157a8a14c2
parentb08d35f826a6b7696a02f1d811da7a2f951e74a1
[mlir][Analysis][NFC] Split FlatAffineValueConstraints into multiple classes

The new class hierarchy is as follows:

* `IntegerRelation` (no change)
* `IntegerPolyhedron` (no change)
* `FlatLinearConstraints`: provides an AffineExpr-based API
* `FlatLinearValueConstraints`: stores an additional mapping of non-local vars to SSA values
* `FlatAffineValueConstraints`: provides additional helper functions for Affine dialect ops
* `FlatAffineRelation` (no change)

`FlatConstraints` and `FlatValueConstraints` are moved from `MLIRAffineAnalysis` to `MLIRAnalysis` and can be used without depending on the Affine dialect.

This change is in preparation of D145681, which adds an MLIR interface that depends on `FlatConstraints` (and cannot depend on the Affine dialect or any other dialect).

Differential Revision: https://reviews.llvm.org/D146201
13 files changed:
mlir/docs/Rationale/UsageOfConst.md
mlir/include/mlir/Analysis/FlatLinearValueConstraints.h [new file with mode: 0644]
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h
mlir/include/mlir/IR/AffineExprVisitor.h
mlir/include/mlir/IR/IntegerSet.h
mlir/lib/Analysis/CMakeLists.txt
mlir/lib/Analysis/FlatLinearValueConstraints.cpp [new file with mode: 0644]
mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
mlir/lib/IR/AffineExpr.cpp
mlir/lib/IR/AffineMap.cpp
mlir/test/Transforms/memref-bound-check.mlir
mlir/test/Transforms/memref-dependence-check.mlir