Apply clang-tidy fixes for performance-unnecessary-copy-initialization in CodegenUtil...
authorMehdi Amini <joker.eph@gmail.com>
Thu, 6 Oct 2022 19:22:18 +0000 (19:22 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 12 Oct 2022 16:22:43 +0000 (16:22 +0000)
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp

index aaeb625..d2a07d4 100644 (file)
@@ -471,7 +471,7 @@ void mlir::sparse_tensor::genReshapeDstShape(
   unsigned start = 0;
   // Expand the i-th dimension in srcShape.
   for (unsigned i = 0, size = srcShape.size(); i < size; i++) {
-    auto map = reassociation[i];
+    const auto &map = reassociation[i];
     auto srcDim = srcShape[i];
     // Iterate through dimensions expanded from the i-th dimension.
     for (unsigned j = start; j < start + map.size(); j++) {