[Mlir-commits] [mlir] 9b1bd23 - Apply clang-tidy fixes for modernize-loop-convert in CodegenUtils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue Nov 15 10:14:25 PST 2022
Author: Mehdi Amini
Date: 2022-11-15T18:14:02Z
New Revision: 9b1bd2357bb2e43734d65e557b52167806c29af4
URL: https://github.com/llvm/llvm-project/commit/9b1bd2357bb2e43734d65e557b52167806c29af4
DIFF: https://github.com/llvm/llvm-project/commit/9b1bd2357bb2e43734d65e557b52167806c29af4.diff
LOG: Apply clang-tidy fixes for modernize-loop-convert in CodegenUtils.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
index fb7edc08368e5..2db2b152958e9 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
@@ -577,10 +577,10 @@ void SparseTensorLoopEmitter::exitCoIterationLoop(
}
// Reduction value from users.
- for (unsigned i = 0, e = reduc.size(); i < e; i++) {
- operands.push_back(reduc[i]);
+ for (auto &i : reduc) {
+ operands.push_back(i);
// In place update reduction variable.
- reduc[i] = whileOp->getResult(o++);
+ i = whileOp->getResult(o++);
}
// An (optional) universal index.
More information about the Mlir-commits
mailing list