@@ -2406,7 +2406,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
2406
2406
ValueRange yieldOpArgs = yieldOp->getOperands ();
2407
2407
2408
2408
bool canSimplify = false ;
2409
- for (auto it : llvm::enumerate (llvm::zip (op.getOperands (), yieldOpArgs))) {
2409
+ for (const auto &it :
2410
+ llvm::enumerate (llvm::zip (op.getOperands (), yieldOpArgs))) {
2410
2411
auto index = static_cast <unsigned >(it.index ());
2411
2412
Value initVal, yieldOpArg;
2412
2413
std::tie (initVal, yieldOpArg) = it.value ();
@@ -2437,7 +2438,8 @@ struct RemoveLoopInvariantArgsFromBeforeBlock
2437
2438
SmallVector<Value> newInitArgs, newYieldOpArgs;
2438
2439
DenseMap<unsigned , Value> beforeBlockInitValMap;
2439
2440
SmallVector<Location> newBeforeBlockArgLocs;
2440
- for (auto it : llvm::enumerate (llvm::zip (op.getOperands (), yieldOpArgs))) {
2441
+ for (const auto &it :
2442
+ llvm::enumerate (llvm::zip (op.getOperands (), yieldOpArgs))) {
2441
2443
auto index = static_cast <unsigned >(it.index ());
2442
2444
Value initVal, yieldOpArg;
2443
2445
std::tie (initVal, yieldOpArg) = it.value ();
@@ -2574,7 +2576,7 @@ struct RemoveLoopInvariantValueYielded : public OpRewritePattern<WhileOp> {
2574
2576
SmallVector<Type> newAfterBlockType;
2575
2577
DenseMap<unsigned , Value> condOpInitValMap;
2576
2578
SmallVector<Location> newAfterBlockArgLocs;
2577
- for (auto it : llvm::enumerate (condOpArgs)) {
2579
+ for (const auto & it : llvm::enumerate (condOpArgs)) {
2578
2580
auto index = static_cast <unsigned >(it.index ());
2579
2581
Value condOpArg = it.value ();
2580
2582
// Those values not defined within `before` block will be considered as
0 commit comments