This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Move values from FlatAffineValueConstraints to PresburgerSpace
AbandonedPublic

Authored by Groverkss on Apr 15 2022, 7:08 AM.

Details

Summary

This patch moves values attached to identifiers to PresburgerSpace. This allows
values to be used by any user of PresburgerSpace.

Support for values in IntegerRelation, IntegerPolyhedron, PresburgerRelation,
PresburgerSet will be added in later patches. For now, only
FlatAffineValueConstraints and it's derivatives use these values.

Diff Detail

Event Timeline

Groverkss created this revision.Apr 15 2022, 7:08 AM
Herald added a project: Restricted Project. · View Herald Transcript
Groverkss requested review of this revision.Apr 15 2022, 7:08 AM
arjunp added inline comments.Apr 15 2022, 10:21 AM
mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
99–100

I would prefer getValue or maybeGetValue

mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
1301

Maybe a PresburgerSpace::swapId should be introduced?

1549–1550

This seems more understandable. Also, use getIdKindOffset?

mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp
24–25
bondhugula requested changes to this revision.Apr 15 2022, 5:39 PM
bondhugula added inline comments.
mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
9–10

"space" in this doc comment isn't properly qualified. Expand and improve this doc comment?

102–104

Doc comment.

169

This name is too generic.

188

The TODO looks vague here. Did you mean to templatize in the future along
PresburgerSpace<Value>?

Can you state in the commit summary clearly with which users of PresburgerSpace these Value support you'd want? FlatAffineValueConstraints has a Value and you've now moved to a class with a purely mathematical name. It's better to I think think about the future scheme of things and hierarchy instead of multiple changes and moves.

This revision now requires changes to proceed.Apr 15 2022, 5:39 PM
Groverkss abandoned this revision.Apr 22 2022, 8:40 AM

Abandoning this patch to explore more design space for this interface. Thank you for your reviews!