forked from OSchip/llvm-project
[mlir][Linalg] Apply ClangTidy performance finding.
Loop variable is copied but only used as const reference.
This commit is contained in:
parent
1334e129a3
commit
3730658ed9
|
@ -502,7 +502,7 @@ void GenerateLoopNest<scf::ForOp>::doit(
|
|||
return;
|
||||
|
||||
// Filter out scf.for loops that were created out of parallel dimensions.
|
||||
for (auto loop : llvm::enumerate(loopNest.loops)) {
|
||||
for (const auto &loop : llvm::enumerate(loopNest.loops)) {
|
||||
if (procInfo[loop.index()].distributionMethod ==
|
||||
DistributionMethod::Cyclic) {
|
||||
mapLoopToProcessorIds(loop.value(), procInfo[loop.index()].procId,
|
||||
|
@ -704,7 +704,7 @@ void GenerateLoopNest<scf::ParallelOp>::doit(
|
|||
unpackRanges(b, loc, loopRanges, lbsStorage, ubsStorage, stepsStorage);
|
||||
|
||||
// Modify the lb, ub, and step based on the distribution options.
|
||||
for (auto it : llvm::enumerate(procInfo)) {
|
||||
for (const auto &it : llvm::enumerate(procInfo)) {
|
||||
if (it.value().distributionMethod != linalg::DistributionMethod::None) {
|
||||
updateBoundsForCyclicDistribution(
|
||||
b, loc, it.value().procId, it.value().nprocs, lbsStorage[it.index()],
|
||||
|
|
Loading…
Reference in New Issue