[PATCH] D80860: Exact integer emptiness checks for FlatAffineConstraints

Arjun P via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 17:29:44 PDT 2020


arjunp updated this revision to Diff 273566.
arjunp marked 4 inline comments as done.
arjunp added a comment.

Improved test coverage <https://superty.github.io/gbr-coverage/>. There is still one uncovered line; it seems quite difficult to find a case that covers this. I ran hundreds of tests with randomly generated sets intersected with a 1000 x 1000 x 1000 cube. Whenever GBR and the FM/GCD-based algorithm disagreed, I checked against a brute-force that checks every point in this cube. All these tests passed, as well as tests from some other types of generated cases.

Added some tests that GBR detects as empty but the existing FM/GCD-based algorithm does not.

Regarding overflow issues, it does not seem to be something specific to this patch. It looks to me like there already exists other functionality in FlatAffineConstraints, like FM, that performs operations without complete overflow checks. I feel that all these need to be addressed together by, say, introducing arbitrary-precision arithmetic, which is beyond the scope of this patch.

Thanks again for all your help with improving this patch!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80860/new/

https://reviews.llvm.org/D80860

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80860.273566.patch
Type: text/x-patch
Size: 96623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200626/26e4295d/attachment-0001.bin>


More information about the llvm-commits mailing list