This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Move LinearTransform to Presburger/
ClosedPublic

Authored by Groverkss on Dec 27 2021, 7:02 AM.

Details

Summary

This patch moves LinearTransform to Presburger/ and makes it use
IntegerPolyhedron instead of FlatAffineConstraints. Also modifies its usage in
FlatAffineConstraints::findIntegerSample to support the changes.

This patch is part of a series of patches for moving presburger math functionality into Presburger directory.

Diff Detail

Event Timeline

Groverkss created this revision.Dec 27 2021, 7:02 AM
Groverkss requested review of this revision.Dec 27 2021, 7:02 AM

I would mention in the summary that this is part of a series of patches moving functionality into Presburger.

mlir/include/mlir/Analysis/AffineStructures.h
84

It's probably better for this to be explicit right?

mlir/include/mlir/Analysis/Presburger/LinearTransform.h
36–38
mlir/lib/Analysis/AffineStructures.cpp
1093

For this patch you can keep this as an FAC right? (convert the result, then you don't need any changes below and don't have to move setAndEliminate?)

Groverkss marked 3 inline comments as done.
  • Address Arjun's comments
Groverkss added inline comments.Dec 29 2021, 5:31 AM
mlir/lib/Analysis/AffineStructures.cpp
1093

LinearTransform returns a IntegerPolyhedron. I don't think you can convert a base class (IntegerPolyhedron) to a derived class (FlatAffineConstriants) here without doing a copy. Is there any specific way you are suggesting?

arjunp accepted this revision.Jan 2 2022, 7:50 AM

Please update the summary as well, as mentioned earlier.

mlir/lib/Analysis/AffineStructures.cpp
1093

I guess this is fine then.

This revision is now accepted and ready to land.Jan 2 2022, 7:50 AM
Groverkss edited the summary of this revision. (Show Details)Jan 2 2022, 9:39 PM
This revision was automatically updated to reflect the committed changes.