This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Add support for IntegerRelation
ClosedPublic

Authored by Groverkss on Feb 18 2022, 12:38 PM.

Details

Summary

This patch adds a class to represent a relation in Presburger Library.

This patch only adds the skeleton class. Functionality from IntegerPolyhedron
will be moved to IntegerRelation in later patches to make it easier to review.

This patch is a part of a series of patches adding support for relations in
Presburger Library.

Diff Detail

Event Timeline

Groverkss created this revision.Feb 18 2022, 12:38 PM
Groverkss requested review of this revision.Feb 18 2022, 12:38 PM
arjunp added inline comments.Feb 18 2022, 2:00 PM
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
24–25

I prefer to keep the original first sentence

30
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
24 ↗(On Diff #410001)
37 ↗(On Diff #410001)

I would add that these can be thought of as points in the polyhedron (x, y) : (1 <= x <= 7, x = 2y).

It's not really a polyhedron per se when it's actually a relation I guess though you can view it as one.

mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
24–25

Not sure if they are solutions when there are no constraints really. Maybe call them space of all possible values of a tuple of integral variables/identifiers

53
57–59
grosser added inline comments.Feb 18 2022, 10:37 PM
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
29

Doman -> Domain

Groverkss updated this revision to Diff 410078.Feb 19 2022, 4:15 AM
Groverkss marked 8 inline comments as done.
  • Address comments

IMO, IntegerRelation and IntegerPolyhedron are so interrelated that you can keep them in the same file.

mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
36 ↗(On Diff #410078)
Groverkss marked an inline comment as done.
  • Address comments
arjunp accepted this revision.Feb 21 2022, 10:37 AM

LGTM, please fix the minor comment below.

mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
36–38
This revision is now accepted and ready to land.Feb 21 2022, 10:37 AM
This revision was automatically updated to reflect the committed changes.
Groverkss marked an inline comment as done.