[MLIR] Move Presburger Math from FlatAffineConstraints to Presburger/IntegerPolyhedron
authorGroverkss <groverkss@gmail.com>
Thu, 9 Dec 2021 10:41:00 +0000 (16:11 +0530)
committerGroverkss <groverkss@gmail.com>
Thu, 9 Dec 2021 11:12:06 +0000 (16:42 +0530)
commit6f9afad6d37be5125f061c9b43ebe4312441d3a0
tree37be4b2eca81e07a0206ce2f80f07f1b0bb07018
parent62cff45d765c045b5c7678b3863bd8bffaecae94
[MLIR] Move Presburger Math from FlatAffineConstraints to Presburger/IntegerPolyhedron

This patch factors out math functionality that is a subset of Presburger arithmetic and moves it from FlatAffineConstraints to Presburger/IntegerPolyhedron. This patch only moves some parts of the functionality planned to be moved, with subsequent patches moving more functionality. There are three main reasons for this:

1. This split makes the Presburger Library easier and more flexible to use
    across MLIR, by not depending on IR.
2. This split allows the Presburger library to be developed independently from
    Affine Analysis, with Affine Analysis using this library.
3. With more functionality being upstreamed to the Presburger Library, the
    mlir/Analysis directory will be cluttered with Presburger library components
    since they depend on math functionality from FlatAffineConstraints. Moving this
    functionality to the Presburger directory allows keeping the new functionality
    in the Presburger directory.

This patch is part of an ongoing effort to make the Presburger Library easier to use. The motivation for this effort is the feedback received at the LLVM conference from Mehdi and others.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D114674
mlir/include/mlir/Analysis/AffineStructures.h
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h [new file with mode: 0644]
mlir/lib/Analysis/AffineStructures.cpp
mlir/lib/Analysis/Presburger/CMakeLists.txt
mlir/lib/Analysis/Presburger/IntegerPolyhedron.cpp [new file with mode: 0644]
mlir/unittests/Analysis/AffineStructuresTest.cpp
mlir/unittests/Analysis/Presburger/CMakeLists.txt
mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp [new file with mode: 0644]