This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Introduce MaybeOptimum type to represent computed optima
ClosedPublic

Authored by arjunp on Feb 18 2022, 5:59 AM.

Details

Summary

This allows to differentiate between the cases where the optimum does not
exist due to being unbounded and due to the polytope being empty.

Diff Detail

Event Timeline

arjunp created this revision.Feb 18 2022, 5:59 AM
arjunp requested review of this revision.Feb 18 2022, 5:59 AM
arjunp updated this revision to Diff 409982.Feb 18 2022, 11:21 AM

clang-format

Groverkss added inline comments.Feb 19 2022, 4:17 AM
mlir/include/mlir/Analysis/Presburger/Utils.h
36

Any reason for MaybeOptimum to not be in presburger_utils?

arjunp added inline comments.Feb 19 2022, 8:51 AM
mlir/include/mlir/Analysis/Presburger/Utils.h
36

It's part of Simplex really, logically. It should be in the same namespace as it. We should move Simplex into a presburger namespace maybe.

arjunp added inline comments.Feb 19 2022, 9:04 AM
mlir/include/mlir/Analysis/Presburger/Utils.h
36

For now I don't mind putting it in presburger_utils. We can move them both into a presburger namespace as you suggested. We can do that later in another patch

Groverkss added inline comments.Feb 19 2022, 9:47 AM
mlir/include/mlir/Analysis/Presburger/Utils.h
36

You can keep it in presburger_utils for now and I will send a patch later today moving things to presburger namespace.

arjunp updated this revision to Diff 410096.Feb 19 2022, 12:01 PM

Move MaybeOptimum into presburger_utils

arjunp updated this revision to Diff 410097.Feb 19 2022, 12:04 PM

Rebase on main

arjunp updated this revision to Diff 410098.Feb 19 2022, 12:06 PM

clang-format

This revision is now accepted and ready to land.Feb 19 2022, 1:00 PM