[MLIR] Extract division representation from equality expressions.
authorPrashant Kumar <pk5561@gmail.com>
Sat, 22 Jan 2022 18:52:46 +0000 (00:22 +0530)
committerPrashant Kumar <pk5561@gmail.com>
Tue, 1 Feb 2022 10:54:28 +0000 (16:24 +0530)
commit1e7c464d2c3c7b9d3edbed542d2a01f909f2d0d6
treece18ab65232272701660196ac0114047784a9c2d
parent5281f0dab2398fdbc60fc7131f8ad2438600e7ae
[MLIR] Extract division representation from equality expressions.

Extract the division representation from equality constraints.
For example:
    32*k == 16*i + j - 31                 <-- k is the localVariable
    expr = 16*i + j - 31, divisor = 32
    k = (16*i + j - 32) floordiv 32
The dividend of the division is set to [16, 1, -32] and the divisor is set
to 32.

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D117959
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
mlir/include/mlir/Analysis/Presburger/Utils.h
mlir/lib/Analysis/Presburger/IntegerPolyhedron.cpp
mlir/lib/Analysis/Presburger/Utils.cpp
mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp