This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] Use `SmallVector` instead of `std::vector` in `getLocalRepr`
ClosedPublic

Authored by pashu123 on Feb 1 2022, 12:10 PM.

Details

Summary

Use SmallVector instead of std::vector in getLocalRepr function.
Also, fix the casing of a variable.

Diff Detail

Event Timeline

pashu123 created this revision.Feb 1 2022, 12:10 PM
pashu123 requested review of this revision.Feb 1 2022, 12:10 PM
arjunp accepted this revision.Feb 1 2022, 12:22 PM
This revision is now accepted and ready to land.Feb 1 2022, 12:22 PM
arjunp added a comment.EditedFeb 2 2022, 4:34 AM

Please add a [Presburger] tag as well to the title. Also, make the summary in imperative, and no need for the full stop in the title. (e.g. "[MLIR][Presburger] Use SmallVector instead of std::vector in getLocalRepr").

pashu123 updated this revision to Diff 405223.Feb 2 2022, 5:00 AM

Updating title and body.

pashu123 retitled this revision from [MLIR] Use `SmallVector` APIs instead of `std::vector` in `getLocalRepr` fn. to [MLIR][Presburger] Use `SmallVector` instead of `std::vector` in `getLocalRepr`.Feb 2 2022, 5:01 AM
pashu123 edited the summary of this revision. (Show Details)
bondhugula added inline comments.Feb 2 2022, 8:06 AM
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
289

SmallVector isn't really optimized to store other SmallVectors AFAIK. std::vector was fine as is.

pashu123 added inline comments.Feb 4 2022, 8:04 AM
mlir/include/mlir/Analysis/Presburger/IntegerPolyhedron.h
289

I will be reverting this patch. Thanks.