You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed an issue where "isolated" local variables can cause problems in the elimination of non-div locals (IntegerRelation -> PresburgerRelation) as well as in the set subtraction algorithm (getSetDifference in PresburgerRelation.cpp).
By "isolated" I mean that there is a local defined in the IntegerRelation system, but there may not be a constraint that links the local to other variables. This sounds contrived, but it can happen if a user constructs an IntegerRelation from an AffineMap where one of the domain variables is not used to calculate the range. Invoking IntegerRelation::getRangeSet would then turn all the domain variables into locals, resulting in a local which is not related to any other variable in the system.
If you then try to compute the "non-div local" representation, I noticed that the number of disjuncts can become much larger than if the local is eliminated (e.g. 2x for each unused local). Furthermore, I will sporadically run into an unreachable here https://github.com/llvm/llvm-project/blob/main/mlir/lib/Analysis/Presburger/Simplex.cpp#L1463. Will update this issue with a concise reproducer.
As a workaround, I added a routine to eliminate such locals whenever I construct an IntegerRelation. It doesn't look like any of the existing simplification routines in IntegerRelation know how to remove with such locals.
The text was updated successfully, but these errors were encountered:
I've noticed an issue where "isolated" local variables can cause problems in the elimination of non-div locals (IntegerRelation -> PresburgerRelation) as well as in the set subtraction algorithm (
getSetDifference
inPresburgerRelation.cpp
).By "isolated" I mean that there is a local defined in the IntegerRelation system, but there may not be a constraint that links the local to other variables. This sounds contrived, but it can happen if a user constructs an IntegerRelation from an AffineMap where one of the domain variables is not used to calculate the range. Invoking
IntegerRelation::getRangeSet
would then turn all the domain variables into locals, resulting in a local which is not related to any other variable in the system.If you then try to compute the "non-div local" representation, I noticed that the number of disjuncts can become much larger than if the local is eliminated (e.g. 2x for each unused local). Furthermore, I will sporadically run into an unreachable here https://github.com/llvm/llvm-project/blob/main/mlir/lib/Analysis/Presburger/Simplex.cpp#L1463. Will update this issue with a concise reproducer.
As a workaround, I added a routine to eliminate such locals whenever I construct an IntegerRelation. It doesn't look like any of the existing simplification routines in
IntegerRelation
know how to remove with such locals.The text was updated successfully, but these errors were encountered: