This patch moves merging of duplicate divisions to presburger utility
functions. This is required to support division merging in structures other
than IntegerPolyhedron.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
60–61 | I think it'll be helpful if you mention clearly that division j thus gets eliminated, and its coefficients get added to i. | |
61 | ||
68 | Why is this return value needed? | |
68 | I think you can specify parameter names here | |
mlir/lib/Analysis/Presburger/Utils.cpp | ||
197 | can mention parameter names here too |
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
68 | This is in case some merge does not want to merge divisions belonging to the same set, which I think we wanted to implement at some point. |
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
68 | I think that can be resolved by just having a separate function to merge within a set and calling that earlier, and I prefer that solution. |
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
69 | I think we should use llvm::function_ref here https://llvm.org/doxygen/classllvm_1_1function__ref_3_01Ret_07Params_8_8_8_08_4.html |
- Use llvm::function_ref instead of std::function &
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
68 | I do not completely understand the way you propose. Could you elaborate more? I think the returning a bool way makes it more general and its a small addition only. |
mlir/include/mlir/Analysis/Presburger/Utils.h | ||
---|---|---|
68 | Sorry, I see that was unclear. What I meant is just write a separate simplify function in IntegerPolyhedron to just simplify divisions within the set. If we call that initially before we run whatever algorithm is using merging, then we know that internal simplifications won't be a problem after that. I'm fine with keeping the bool return as well, but I'm not sure this generality is needed. |