[Mlir-commits] [mlir] 5e92f7e - Apply clang-tidy fixes for performance-unnecessary-value-param in SparseTensorCodegen.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Jan 6 02:39:03 PST 2023
Author: Mehdi Amini
Date: 2023-01-06T10:38:54Z
New Revision: 5e92f7edd2500e39fef0bbecd562465d99bf0236
URL: https://github.com/llvm/llvm-project/commit/5e92f7edd2500e39fef0bbecd562465d99bf0236
DIFF: https://github.com/llvm/llvm-project/commit/5e92f7edd2500e39fef0bbecd562465d99bf0236.diff
LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in SparseTensorCodegen.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
index 0ffcfd8190ae..a680ddf06d88 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
@@ -103,10 +103,9 @@ static scf::ForOp createFor(OpBuilder &builder, Location loc, Value upper,
/// Gets the dimension size for the given sparse tensor at the given
/// original dimension 'dim'. Returns std::nullopt if no sparse encoding is
/// attached to the given tensor type.
-static std::optional<Value> sizeFromTensorAtDim(OpBuilder &builder,
- Location loc,
- SparseTensorDescriptor desc,
- unsigned dim) {
+static std::optional<Value>
+sizeFromTensorAtDim(OpBuilder &builder, Location loc,
+ const SparseTensorDescriptor &desc, unsigned dim) {
RankedTensorType rtp = desc.getTensorType();
// Access into static dimension can query original type directly.
// Note that this is typically already done by DimOp's folding.
More information about the Mlir-commits
mailing list