[Mlir-commits] [mlir] c1d36e2 - [mlir][SCF] Apply suggested ClangTidy fixes.
Adrian Kuegel
llvmlistbot at llvm.org
Wed Feb 23 23:23:58 PST 2022
Author: Adrian Kuegel
Date: 2022-02-24T08:23:24+01:00
New Revision: c1d36e23047e54ad3b3bb42f0519443c7a6c6e45
URL: https://github.com/llvm/llvm-project/commit/c1d36e23047e54ad3b3bb42f0519443c7a6c6e45
DIFF: https://github.com/llvm/llvm-project/commit/c1d36e23047e54ad3b3bb42f0519443c7a6c6e45.diff
LOG: [mlir][SCF] Apply suggested ClangTidy fixes.
Added:
Modified:
mlir/lib/Dialect/SCF/SCF.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index 54c93e93f37e8..7bb2df9137e45 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -2406,7 +2406,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
ValueRange yieldOpArgs = yieldOp->getOperands();
bool canSimplify = false;
- for (auto it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
+ for (const auto &it :
+ llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
auto index = static_cast<unsigned>(it.index());
Value initVal, yieldOpArg;
std::tie(initVal, yieldOpArg) = it.value();
@@ -2437,7 +2438,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
SmallVector<Value> newInitArgs, newYieldOpArgs;
DenseMap<unsigned, Value> beforeBlockInitValMap;
SmallVector<Location> newBeforeBlockArgLocs;
- for (auto it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
+ for (const auto &it :
+ llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) {
auto index = static_cast<unsigned>(it.index());
Value initVal, yieldOpArg;
std::tie(initVal, yieldOpArg) = it.value();
@@ -2574,7 +2576,7 @@ struct RemoveLoopInvariantValueYielded : public OpRewritePattern<WhileOp> {
SmallVector<Type> newAfterBlockType;
DenseMap<unsigned, Value> condOpInitValMap;
SmallVector<Location> newAfterBlockArgLocs;
- for (auto it : llvm::enumerate(condOpArgs)) {
+ for (const auto &it : llvm::enumerate(condOpArgs)) {
auto index = static_cast<unsigned>(it.index());
Value condOpArg = it.value();
// Those values not defined within `before` block will be considered as
More information about the Mlir-commits
mailing list