[PATCH] D80860: Exact integer emptiness checks for FlatAffineConstraints

Arjun P via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 19:32:05 PDT 2020


arjunp marked an inline comment as done.
arjunp added a comment.

In D80860#2118522 <https://reviews.llvm.org/D80860#2118522>, @bondhugula wrote:

> In D80860#2115848 <https://reviews.llvm.org/D80860#2115848>, @arjunp wrote:
>
> >
>
>
>
>
> > Added some tests that GBR detects as empty but the existing FM/GCD-based algorithm does not.
>
> It'll be useful if you marked these tests with a comment to that effect. I might have missed it if you already did.


This is marked at `AffineStructuresTest.cpp:247`.



================
Comment at: mlir/lib/Analysis/Presburger/Simplex.cpp:706
+private:
+  // Returns coefficients for the expression <dir, x - y>.
+  SmallVector<int64_t, 8> getCoeffsForDirection(ArrayRef<int64_t> dir) {
----------------
bondhugula wrote:
> Can you rephrase this? <dir, x-y> is unclear.
I've replaced it with the more explicit `dotProduct` everywhere now. (this was originally explained in the top-level class comment)


================
Comment at: mlir/unittests/Analysis/AffineStructuresTest.cpp:64
+
+/// We don't implement Vector of Vectors to ArrayRef of ArrayRefs since that
+/// would necessitate worrying about possible dangling references.
----------------
Is there a better way? This is needed since we moved to ArrayRefs for arguments but in `checkPermutationsSample` below we need to pass SmallVectors of SmallVectors to `makeFACFromConstraints`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80860





More information about the llvm-commits mailing list