[Mlir-commits] [mlir] e546a6e - Apply clang-tidy fixes for modernize-loop-convert in Utils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Feb 12 13:28:14 PST 2024
Author: Mehdi Amini
Date: 2024-02-12T13:27:49-08:00
New Revision: e546a6e95da62b39ba7903e0371fdaa210417e8d
URL: https://github.com/llvm/llvm-project/commit/e546a6e95da62b39ba7903e0371fdaa210417e8d
DIFF: https://github.com/llvm/llvm-project/commit/e546a6e95da62b39ba7903e0371fdaa210417e8d.diff
LOG: Apply clang-tidy fixes for modernize-loop-convert in Utils.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/SCF/Utils/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/Utils/Utils.cpp b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
index cdd85ddeb93add..536c02feca1bd5 100644
--- a/mlir/lib/Dialect/SCF/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
@@ -634,9 +634,9 @@ void mlir::collapseParallelLoops(
SmallVector<Value, 3> lowerBounds, upperBounds, steps;
auto cst0 = outsideBuilder.create<arith::ConstantIndexOp>(loc, 0);
auto cst1 = outsideBuilder.create<arith::ConstantIndexOp>(loc, 1);
- for (unsigned i = 0, e = sortedDimensions.size(); i < e; ++i) {
+ for (auto &sortedDimension : sortedDimensions) {
Value newUpperBound = outsideBuilder.create<arith::ConstantIndexOp>(loc, 1);
- for (auto idx : sortedDimensions[i]) {
+ for (auto idx : sortedDimension) {
newUpperBound = outsideBuilder.create<arith::MulIOp>(
loc, newUpperBound, normalizedUpperBounds[idx]);
}
More information about the Mlir-commits
mailing list