This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Factor out various Space equality checks to PresburgerSpace::isEqual
ClosedPublic

Authored by Groverkss on Feb 25 2022, 6:20 AM.

Details

Summary

This patch factors out various checks for dimension compatibility to
PresburgerSpace::isEqual and PresburgerLocalSpace::isEqual (for local
identifiers).

Diff Detail

Event Timeline

Groverkss created this revision.Feb 25 2022, 6:20 AM
Groverkss requested review of this revision.Feb 25 2022, 6:20 AM
arjunp requested changes to this revision.Feb 25 2022, 6:43 AM
arjunp added inline comments.
mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
100

inline keyword is redundant here

100

If I pass a PresburgerLocalSpace to this, it will return true even if their locals aren't equal. that seems misleading

mlir/lib/Analysis/Presburger/PWMAFunction.cpp
161

Just use PresburgerSpace:: isEqual? That also makes it immediately clear we're checking if they're equal as PresburgerSpaces here, i.e., ignoring the locals.

This revision now requires changes to proceed.Feb 25 2022, 6:43 AM
Groverkss updated this revision to Diff 411443.Feb 25 2022, 9:49 AM
Groverkss marked 3 inline comments as done.
  • Address Arjun's comments
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
161

MultiAffineFunction is protected inheritance from IntegerPolyhedron so I cannot use that.

arjunp accepted this revision.Feb 25 2022, 10:38 AM
arjunp added inline comments.
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
161

Good point.

This revision is now accepted and ready to land.Feb 25 2022, 10:38 AM
This revision was landed with ongoing or failed builds.Feb 26 2022, 4:35 AM
This revision was automatically updated to reflect the committed changes.