[Mlir-commits] [mlir] c86bb3d - [mlir] Use a range-based for loop (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Tue Sep 5 00:30:46 PDT 2023
Author: Kazu Hirata
Date: 2023-09-05T00:30:40-07:00
New Revision: c86bb3d91accc757b138eea1f507775cdcd7db1c
URL: https://github.com/llvm/llvm-project/commit/c86bb3d91accc757b138eea1f507775cdcd7db1c
DIFF: https://github.com/llvm/llvm-project/commit/c86bb3d91accc757b138eea1f507775cdcd7db1c.diff
LOG: [mlir] Use a range-based for loop (NFC)
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
index 7660431e4b725d6..9feaceac2f51bdd 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
@@ -2117,10 +2117,8 @@ bool LoopEmitter::genSliceBegin(OpBuilder &builder, Location loc, TensorId tid,
bufSize = MULI(bufSize, C_IDX(kSliceIterWidth));
// Additional two metadata {memSize, idx} at head.
bufSize = ADDI(bufSize, c2);
- llvm::for_each(
- slicePosBuffer[tid][lvl], [bufSize, loc, &builder](Value &cache) {
- cache = genAlloca(builder, loc, bufSize, builder.getIndexType());
- });
+ for (Value &cache : slicePosBuffer[tid][lvl])
+ cache = genAlloca(builder, loc, bufSize, builder.getIndexType());
}
if (sliceInfo.isInitialTensor() ||
More information about the Mlir-commits
mailing list