Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[MLIR][Presburger] Add getDomainSet, getRangeSet to IntegerRelation

Authored by Groverkss on May 24 2022, 1:56 PM.



This patch adds support for obtaining a set corresponding to the domain/range
of the relation.

Diff Detail

Event Timeline

Groverkss created this revision.May 24 2022, 1:56 PM
Groverkss requested review of this revision.May 24 2022, 1:56 PM
ftynse added inline comments.May 25 2022, 5:20 AM

Should this be marked explicit? Given this can assert, it sounds preferable for the user to explicitly request the conversion rather than have it fire in some implicit conversion sequence.


Looks like you only need to provide IntegerPolyhedron(IntegerRelation &&) for this, so why not do it immediately rather than leaving a todo?


Doing return IntegerPolyhedron(copyRel); (or return IntegerPolyhedron(std::move(copyRel)); will guarantee copy/move elision in C++17. Naming the value will not, although the compiler is likely to figure it out on its own.

Groverkss updated this revision to Diff 431972.May 25 2022, 6:57 AM
Groverkss marked 3 inline comments as done.
  • Make IntegerPolyhedron constructor from IntegerRelation explicit.
  • Add move constructor for IntegerPolyhedron and use it.
ftynse accepted this revision.May 25 2022, 7:01 AM
This revision is now accepted and ready to land.May 25 2022, 7:01 AM
This revision was landed with ongoing or failed builds.May 25 2022, 7:06 AM
This revision was automatically updated to reflect the committed changes.