[Mlir-commits] [mlir] 50da013 - [mlir] Use const reference for loop iteration variable.

Adrian Kuegel llvmlistbot at llvm.org
Fri Jan 7 03:02:46 PST 2022


Author: Adrian Kuegel
Date: 2022-01-07T12:00:53+01:00
New Revision: 50da01340658ff4b53721f5efdff551a2f3840f2

URL: https://github.com/llvm/llvm-project/commit/50da01340658ff4b53721f5efdff551a2f3840f2
DIFF: https://github.com/llvm/llvm-project/commit/50da01340658ff4b53721f5efdff551a2f3840f2.diff

LOG: [mlir] Use const reference for loop iteration variable.

Added: 
    

Modified: 
    mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
index 9fd5de11a83d2..424c91f2aca16 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
@@ -657,7 +657,7 @@ static Value buildPredicateList(pdl::PatternOp pattern,
   // Traverse the selected optimal branching. For all edges in order, traverse
   // up starting from the connector, until the candidate root is reached, and
   // call getTreePredicates at every node along the way.
-  for (auto it : llvm::enumerate(bestEdges)) {
+  for (const auto &it : llvm::enumerate(bestEdges)) {
     Value target = it.value().first;
     Value source = it.value().second;
 


        


More information about the Mlir-commits mailing list