[Mlir-commits] [mlir] 7c5f06a - Apply clang-tidy fixes for llvm-else-after-return in SparseTensorCodegen.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Thu Nov 17 22:23:15 PST 2022
Author: Mehdi Amini
Date: 2022-11-18T06:22:53Z
New Revision: 7c5f06a7dc1319ad012e4f7266de5d5780169de6
URL: https://github.com/llvm/llvm-project/commit/7c5f06a7dc1319ad012e4f7266de5d5780169de6
DIFF: https://github.com/llvm/llvm-project/commit/7c5f06a7dc1319ad012e4f7266de5d5780169de6.diff
LOG: Apply clang-tidy fixes for llvm-else-after-return 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 407756723071f..910b74414c0f1 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
@@ -272,14 +272,12 @@ static void allocSchemeForRank(OpBuilder &builder, Location loc,
}
if (isSingletonDim(rtp, r)) {
return; // nothing to do
- } else {
- // Keep compounding the size, but nothing needs to be initialized
+ } // Keep compounding the size, but nothing needs to be initialized
// at this level. We will eventually reach a compressed level or
// otherwise the values array for the from-here "all-dense" case.
assert(isDenseDim(rtp, r));
Value size = sizeAtStoredDim(builder, loc, rtp, fields, r);
linear = builder.create<arith::MulIOp>(loc, linear, size);
- }
}
// Reached values array so prepare for an insertion.
Value valZero = constantZero(builder, loc, rtp.getElementType());
More information about the Mlir-commits
mailing list