Add support for computing an overapproximation of the number of integer points
in a polyhedron. The returned result is actually the number of integer points
one gets by computing the "rational shadow" obtained by projecting out the
local IDs, finding the minimal axis-parallel hyperrectangular approximation
of the shadow, and returning the number of integer points in that. This does
not currently support symbols.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Analysis/Presburger/Simplex.cpp | ||
---|---|---|
1478–1479 ↗ | (On Diff #406758) | Maybe add an assert here with this comment. |
mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp | ||
699–723 | You can put these into Utils.h after https://reviews.llvm.org/D119194 is landed |
Thanks for the quick review!
mlir/lib/Analysis/Presburger/Simplex.cpp | ||
---|---|---|
1478–1479 ↗ | (On Diff #406758) | There is already an assert, inside Optional::operator* |
mlir/lib/Analysis/Presburger/PresburgerSet.cpp | ||
---|---|---|
390–392 | You may want to state in the doc comment that the approximation could be far away from a tight one depending on the overlap. | |
mlir/lib/Analysis/Presburger/Simplex.cpp | ||
1476–1481 ↗ | (On Diff #406758) | Are these changes related? |
mlir/lib/Analysis/Presburger/Simplex.cpp | ||
---|---|---|
1476–1481 ↗ | (On Diff #406758) | Yeah, they're needed because we had to change the return type of computeIntegerBounds. That can be separated out into another commit though, which I've done now |
mlir/unittests/Analysis/Presburger/Utils.h | ||
---|---|---|
49 | Getting error about this function being unused. Can it be removed? |
mlir/unittests/Analysis/Presburger/Utils.h | ||
---|---|---|
49 | It can't be removed. It's called from function called expectComputedVolumeIsValidOverapprox in IntegerPolyhedronTest.cpp and another with same name in PresburgerSetTest.cpp. Where does the error occur? |
mlir/unittests/Analysis/Presburger/Utils.h | ||
---|---|---|
49 | This has apparently been fixed |
You may want to state in the doc comment that the approximation could be far away from a tight one depending on the overlap.