[mlir][sparse] cleanup small vector constant hints
authorAart Bik <ajcbik@google.com>
Tue, 15 Nov 2022 22:15:35 +0000 (14:15 -0800)
committerAart Bik <ajcbik@google.com>
Tue, 15 Nov 2022 23:09:06 +0000 (15:09 -0800)
commit0e1708ff649f5883749877558f839b26c85725fd
tree0b6c2d39135588d08aaf5a07c3324ff05c7462b8
parentdbd31935ed0384b5d72dd4fc5f0309853b2da844
[mlir][sparse] cleanup small vector constant hints

Following advise from

https://llvm.org/docs/ProgrammersManual.html#llvm-adt-smallvector-h

This revision removes the size hints from SmallVector (unless we are
certain of the resulting number of elements). Also, this replaces
SmallVector references with SmallVectorImpl references.

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D138063
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp