This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Simplex::normalizeRow: early exit when gcd is one
ClosedPublic

Authored by arjunp on Jan 5 2022, 9:42 AM.

Diff Detail

Event Timeline

arjunp created this revision.Jan 5 2022, 9:42 AM
arjunp requested review of this revision.Jan 5 2022, 9:42 AM
bondhugula accepted this revision.Jan 5 2022, 9:45 AM
bondhugula added inline comments.
mlir/lib/Analysis/Presburger/Simplex.cpp
133

What's the denominator here? Doesn't seem to be in context.

This revision is now accepted and ready to land.Jan 5 2022, 9:45 AM
arjunp updated this revision to Diff 397623.Jan 5 2022, 9:52 AM

Clarified where the denominator is.

mlir/lib/Analysis/Presburger/Simplex.cpp
133

The first element of every row is the denominator. This is also documented in the class header, but I mentioned it here as well for clarity. Thanks for the quick review.

This revision was landed with ongoing or failed builds.Jan 5 2022, 9:56 AM
This revision was automatically updated to reflect the committed changes.
mehdi_amini added inline comments.Jan 5 2022, 7:28 PM
mlir/lib/Analysis/Presburger/Simplex.cpp
134

Nit: in general instead of two lines of comments, I like to "document with assert":

assert(gcd && "first element of each row is the denominator and should be non-zero");