Skip to content

Commit 654e65d

Browse files
committed
[mlir] Apply ClangTidy performance fix.
Use const reference for loop variable.
1 parent b5437c8 commit 654e65d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Analysis/Presburger/Barvinok.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ mlir::presburger::detail::computePolytopeGeneratingFunction(
425425
// cones.
426426
GeneratingFunction vertexGf(numSymbols, {}, {}, {});
427427
SmallVector<std::pair<int, ConeH>, 4> unimodCones = {{1, tangentCone}};
428-
for (std::pair<int, ConeH> signedCone : unimodCones) {
428+
for (const std::pair<int, ConeH> &signedCone : unimodCones) {
429429
auto [sign, cone] = signedCone;
430430
vertexGf = vertexGf +
431431
computeUnimodularConeGeneratingFunction(*vertex, sign, cone);
@@ -785,4 +785,4 @@ mlir::presburger::detail::computeNumTerms(const GeneratingFunction &gf) {
785785
}
786786

787787
return totalTerm.simplify();
788-
}
788+
}

0 commit comments

Comments
 (0)