This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Simplex: remove redundant zeroing out of row
ClosedPublic

Authored by arjunp on May 31 2022, 10:13 AM.

Details

Summary

This fillRow(..., 0) is redundant because when the size of the tableau is
consistent, the resize always creates a new row, which is zero-initialized.

Also added asserts throughout to ensure the dimensions of the tableau remain
consistent.

Diff Detail

Event Timeline

arjunp created this revision.May 31 2022, 10:13 AM
arjunp requested review of this revision.May 31 2022, 10:13 AM
arjunp retitled this revision from [MLIR][Presburger] Simplex: remove redundant fillRow with zero to [MLIR][Presburger] Simplex: remove redundant zeroing out of row.May 31 2022, 10:15 AM
arjunp updated this revision to Diff 433129.May 31 2022, 10:17 AM

fix build

Groverkss added inline comments.May 31 2022, 12:35 PM
mlir/lib/Analysis/Presburger/Simplex.cpp
88

I think we can do it as part of this patch itself. Seems like a simple find and replace.

arjunp added inline comments.May 31 2022, 2:20 PM
mlir/lib/Analysis/Presburger/Simplex.cpp
88

It clutters the patch a lot, I prefer not to do it in the same one.

Groverkss accepted this revision.May 31 2022, 3:19 PM

LGTM.

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

Sure.

This revision is now accepted and ready to land.May 31 2022, 3:19 PM