It is often necessary to "rollback" IntegerRelations to an earlier state. Although providing full rollback support is non-trivial, we really only need to support the case where the only changes made are to append ids or append constraints, and then rollback these additions. This patch adds support to rollback in such situations by recording the number of ids and constraints of each kind and providing support to truncate the IntegerRelation to those counts by removing appended ids and constraints. This already simplifies subtraction a little bit and will also be useful in the implementation of symbolic integer lexmin.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h | ||
---|---|---|
159 | Can we have a better name than Counts? Maybe IntegerRelationState or something more descriptive? |
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h | ||
---|---|---|
159 | I named it counts to make it clear it's not really a proper thing storing the full state. Do you have a better suggestion that also conveys that it's not a proper snapshot? |
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h | ||
---|---|---|
159 | Maybe CountState? I just find Counts not very descriptive. |
Can we have a better name than Counts? Maybe IntegerRelationState or something more descriptive?