Earlier computeSingleVarRepr was returning a pair of upper bound and
lower bound indices of the inequality contraints that can be expressed
as a floordiv of an affine function. The equality expression can also be
expressed as a floordiv but contains only one index and hence the LocalRepr
class is introduced to facilitate this.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Analysis/AffineStructures.cpp | ||
---|---|---|
858–859 | Until support for equalities is added I would recommend returning false here in case of equality also. | |
mlir/lib/Analysis/Presburger/IntegerPolyhedron.cpp | ||
837 | You can add using namespace presburger_utils in this file and use ReprKind directly. | |
mlir/lib/Analysis/Presburger/PresburgerSet.cpp | ||
224–225 | The name "maybePair" does not make sense now. Please change it to repr or something similar. | |
mlir/lib/Analysis/Presburger/Utils.cpp | ||
147 | I would recommend add using namespace presburge_utils in this file and using LocalRepr directly. |
mlir/lib/Analysis/Presburger/PresburgerSet.cpp | ||
---|---|---|
224–225 | Since we are asserting for inequality any way below, I think maybeInequality makes sense. |
mlir/lib/Analysis/Presburger/Utils.cpp | ||
---|---|---|
156 | It's not clear that this is guaranteed to be initialized before the return statement. |
Please rewrite the commit title to use active: eg:
[MLIR] Update return type for computeSingleVarRepr` to include equalities`
(much more compact)
Edit: Looks like this was already merged.
Next time I will take care of this. Thanks.
mlir/lib/Analysis/Presburger/Utils.cpp | ||
---|---|---|
156 | @mehdi_amini I have the required changes in this patch: https://reviews.llvm.org/D117959 |
Until support for equalities is added I would recommend returning false here in case of equality also.