This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Use PresburgerSpace in constructors
ClosedPublic

Authored by Groverkss on Mar 31 2022, 11:48 AM.

Details

Summary

This patch modifies IntegerPolyhedron, IntegerRelation, PresburgerRelation,
PresburgerSet, PWMAFunction, constructors to take PresburgerSpace instead of
dimensions. This allows information present in PresburgerSpace to be carried
better and allows for a general interface.

Diff Detail

Event Timeline

Groverkss created this revision.Mar 31 2022, 11:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2022, 11:48 AM
Groverkss requested review of this revision.Mar 31 2022, 11:48 AM
arjunp added inline comments.Mar 31 2022, 1:40 PM
mlir/lib/Analysis/Presburger/IntegerRelation.cpp
1881–1883

Why this change? Maybe they wanted to avoid mallocs on copying, though I don't know why RVO wouldn't take place...

mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
458–460

Can just store a space here and then pass it below instead. (Not necessarily for this patch.)

Groverkss updated this revision to Diff 419670.Apr 1 2022, 1:52 AM
Groverkss marked an inline comment as done.
  • Revert change to getCommonConstraints
Groverkss added inline comments.Apr 1 2022, 1:54 AM
mlir/lib/Analysis/Presburger/IntegerRelation.cpp
1881–1883

I will send this change as a patch after this patch and we can discuss this. Reverting this back for now.

mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
458–460

I'll send it as patch after this patch.

arjunp accepted this revision.Apr 1 2022, 2:28 AM
This revision is now accepted and ready to land.Apr 1 2022, 2:28 AM
This revision was automatically updated to reflect the committed changes.