diff --git a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp index 213e1fd4176c5..7910e83eac981 100644 --- a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp +++ b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp @@ -167,7 +167,7 @@ loopScheduling(scf::ForOp forOp, opCycles[&op] = earlyCycle; wrappedSchedule[earlyCycle % iterationInterval].push_back(&op); } - for (auto it : wrappedSchedule) { + for (const auto &it : wrappedSchedule) { for (Operation *op : it.second) { unsigned cycle = opCycles[op]; schedule.push_back(std::make_pair(op, cycle / iterationInterval));