[all-commits] [llvm/llvm-project] 10a898: [MLIR] Exact integer emptiness checks for FlatAffi...

Arjun P via All-commits all-commits at lists.llvm.org
Thu Jul 2 07:24:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 10a898b3ecd638c58803e471b1ec239e58574635
      https://github.com/llvm/llvm-project/commit/10a898b3ecd638c58803e471b1ec239e58574635
  Author: Arjun P <arjunpitchanathan at gmail.com>
  Date:   2020-07-02 (Thu, 02 Jul 2020)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineStructures.h
    A mlir/include/mlir/Analysis/Presburger/Fraction.h
    A mlir/include/mlir/Analysis/Presburger/Matrix.h
    A mlir/include/mlir/Analysis/Presburger/Simplex.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/Presburger/CMakeLists.txt
    A mlir/lib/Analysis/Presburger/Matrix.cpp
    A mlir/lib/Analysis/Presburger/Simplex.cpp
    A mlir/unittests/Analysis/AffineStructuresTest.cpp
    A mlir/unittests/Analysis/CMakeLists.txt
    A mlir/unittests/Analysis/Presburger/CMakeLists.txt
    A mlir/unittests/Analysis/Presburger/MatrixTest.cpp
    A mlir/unittests/Analysis/Presburger/SimplexTest.cpp
    M mlir/unittests/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Exact integer emptiness checks for FlatAffineConstraints

This patch adds the capability to perform exact integer emptiness checks for FlatAffineConstraints using the General Basis Reduction algorithm (GBR). Previously, only a heuristic was available for emptiness checks, which was not guaranteed to always give a conclusive result.

This patch adds a `Simplex` class, which can be constructed using a `FlatAffineConstraints`, and can find an integer sample point (if one exists) using the GBR algorithm. Additionally, it adds two classes `Matrix` and `Fraction`, which are used by `Simplex`.

The integer emptiness check functionality can be accessed through the new `FlatAffineConstraints::isIntegerEmpty()` function, which runs the existing heuristic first and, if that proves to be inconclusive, runs the GBR algorithm to produce a conclusive result.

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




More information about the All-commits mailing list