This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add clearAndCopyFrom to IntegerPolyhedron
ClosedPublic

Authored by Groverkss on Jan 3 2022, 5:08 AM.

Details

Summary

This patch adds clearAndCopyFrom to IntegerPolyhedron. This requires moving
LLVM-style RTTI from FlatAffineConstraints to IntegerPolyhedron.

This patch is part of a series of patches to move presburger math to Presburger
directory.

Diff Detail

Event Timeline

Groverkss created this revision.Jan 3 2022, 5:08 AM
Groverkss requested review of this revision.Jan 3 2022, 5:08 AM
bondhugula added inline comments.Jan 3 2022, 7:31 PM
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
53

The comment here is misleading: all derived classes of IntegerPolyhedron?

87

Copy-pasted but missing update?

Groverkss updated this revision to Diff 397194.Jan 3 2022, 9:01 PM
Groverkss marked 2 inline comments as done.
  • Fix doc comments.
arjunp added inline comments.Jan 4 2022, 11:32 AM
mlir/lib/Analysis/AffineStructures.cpp
2646

Even though it currently doesn't make a difference, I think for maintainability it's better if you consider the FAC case as well.

2660

Same here.

Groverkss updated this revision to Diff 397398.Jan 4 2022, 2:07 PM
Groverkss marked 2 inline comments as done.
  • Address Arjun's comments
arjunp accepted this revision.Jan 5 2022, 8:49 AM
arjunp added inline comments.
mlir/lib/Analysis/AffineStructures.cpp
2659–2669

You can deduplicate setting the values

This revision is now accepted and ready to land.Jan 5 2022, 8:49 AM
grosser added inline comments.Jan 5 2022, 8:51 AM
mlir/lib/Analysis/AffineStructures.cpp
2659–2669

Also, maybe use return to avoid this if-else chain?

Groverkss updated this revision to Diff 397612.Jan 5 2022, 9:18 AM
Groverkss marked 2 inline comments as done.
  • Address Arjun's comments
This revision was automatically updated to reflect the committed changes.