This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] remove redundant constraints in coalesce
ClosedPublic

Authored by webmiche on Mar 18 2022, 3:37 AM.

Details

Summary

This patch improves the representation size of individual
IntegerRelations by calling the function
IntegerRelation::removeRedundantConstraints. While this is only a
slight optimization in the current version, it will be necessary for
patches to come.

Diff Detail

Event Timeline

webmiche created this revision.Mar 18 2022, 3:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 3:37 AM
webmiche requested review of this revision.Mar 18 2022, 3:37 AM
arjunp added inline comments.Mar 18 2022, 4:47 AM
mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
492–498

Will there be an issue if disjuncts[i] loses some constraints and these are not present in simp? Should simp be constructed after removing redundant constraints here?

webmiche added inline comments.Mar 20 2022, 5:38 AM
mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
492–498

AFAIK, the simp won't be updated when disjuncts[i] changes, so you are right, redundant constraints should be removed first, then the simplex should be constructed.

webmiche updated this revision to Diff 416772.Mar 20 2022, 5:41 AM

remove redundant constraints before constructing the simplex

arjunp accepted this revision.Mar 20 2022, 5:58 AM
This revision is now accepted and ready to land.Mar 20 2022, 5:58 AM
This revision was automatically updated to reflect the committed changes.