[Mlir-commits] [mlir] 2d06420 - Apply clang-tidy fixes for performance-for-range-copy in SCF.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Thu Apr 14 02:42:53 PDT 2022
Author: Mehdi Amini
Date: 2022-04-14T09:42:36Z
New Revision: 2d06420879d7c139cb40e9a4dc3677897672c1ec
URL: https://github.com/llvm/llvm-project/commit/2d06420879d7c139cb40e9a4dc3677897672c1ec
DIFF: https://github.com/llvm/llvm-project/commit/2d06420879d7c139cb40e9a4dc3677897672c1ec.diff
LOG: Apply clang-tidy fixes for performance-for-range-copy in SCF.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/SCF/SCF.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index f010bc658b663..d160057838d31 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -1769,7 +1769,7 @@ struct CombineNestedIfs : public OpRewritePattern<IfOp> {
// Note that the array access to elseYield will not go out of bounds
// since it must have the same length as thenYield, since they both
// come from the same scf.if.
- for (auto tup : llvm::enumerate(thenYield)) {
+ for (const auto &tup : llvm::enumerate(thenYield)) {
if (tup.value().getDefiningOp() == nestedIf) {
auto nestedIdx = tup.value().cast<OpResult>().getResultNumber();
if (nestedIf.elseYield().getOperand(nestedIdx) !=
More information about the Mlir-commits
mailing list