Add support for intersecting, subtracting, complementing and checking equality of sets having divisions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Added some comments
mlir/include/mlir/Analysis/PresburgerSet.h | ||
---|---|---|
74–78 | Could you mention that local variables are not required to correspond to floor divisions? Just to prevent any confusion. | |
mlir/lib/Analysis/PresburgerSet.cpp | ||
195–196 | Possible Typo: "of sI correspond to division inequalities" | |
281–282 | Should this be "The result is correct whether or not we ignore the redundant and division inequalities"? | |
284–288 | nit: This can be written in one if condition. | |
mlir/unittests/Analysis/PresburgerSetTest.cpp | ||
610–620 | Suggestion: Instead of adding a local variable and an equality, You can directly use addLocalFloorDiv. |
Thanks for the review!
mlir/lib/Analysis/PresburgerSet.cpp | ||
---|---|---|
284–288 | I think LLVM prefers them separate, and I do too. https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code | |
mlir/unittests/Analysis/PresburgerSetTest.cpp | ||
610–620 | I prefer it this way; changing makeFAC... to take floor divs means the number of ids specified will be mismatched either with the div numerator or with the inequalities. I guess it would be useful in this case to factor out a function to just add the inequalities and not add an id. I think we can keep that for another patch though. |
This looks good to me.
mlir/lib/Analysis/PresburgerSet.cpp | ||
---|---|---|
293 | const ArrayRef isn't meaningful - ArrayRef is const by design. | |
294–295 | Rephrase first sentence here - doesn't parse well. | |
mlir/unittests/Analysis/PresburgerSetTest.cpp | ||
83–85 | Nit: Use backticks when referring to the arguments by name here. | |
101 | Missing doc comment although this is from before. | |
106 | Missing doc comment although this is from before. |
Could you mention that local variables are not required to correspond to floor divisions? Just to prevent any confusion.