This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Support divisions in union of two PWMAFunction
ClosedPublic

Authored by Groverkss on Nov 16 2022, 4:21 AM.

Details

Summary

This patch adds support for divisions in the union of two PWMAFunction. This is
now possible because of previous patches, which made divisions explicitly
stored in MultiAffineFunction (MAF). This patch also refactors the previous
implementation, moving the implementation for obtaining a set of points where a
MAF is lexicographically "better" than the other to MAF.

Diff Detail

Event Timeline

Groverkss created this revision.Nov 16 2022, 4:21 AM
Groverkss requested review of this revision.Nov 16 2022, 4:21 AM
Groverkss updated this revision to Diff 475771.Nov 16 2022, 4:23 AM
  • Fix spell error

Why is the Compare change in this patch?

mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
26

maybe use Ordering to follow std::strong_ordering

99–102
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
286
356

maybe mention in a comment that this is templated since it's passed as a a lambda. wish we had better partial application in c++!

bondhugula requested changes to this revision.Nov 28 2022, 10:23 PM

Please add a commit summary.

mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
26

Compare -> ComparisonKind

Please use more descriptive naming.

This revision now requires changes to proceed.Nov 28 2022, 10:23 PM
Groverkss marked 5 inline comments as done.

Address comments

I used OrderingKind enum in this patch because I wanted to move the lexSet implementation to MultiAffineFunction.

Groverkss edited the summary of this revision. (Show Details)Dec 14 2022, 12:27 PM

Removing change request.

arjunp accepted this revision.Jan 4 2023, 1:32 PM
This revision is now accepted and ready to land.Jan 4 2023, 1:32 PM