[llvm] Replace copy with a reference. (PR #82485)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 04:55:15 PST 2024


================
@@ -712,7 +712,7 @@ void SelectOptimizeImpl::convertProfitableSIGroups(SelectGroups &ProfSIGroups) {
                                    SI.getCondition()->getName() + ".frozen");
 
     SmallPtrSet<const Instruction *, 2> INS;
-    for (auto SI : ASI)
+    for (auto &SI : ASI)
----------------
phoebewang wrote:

The `SelectLike` is a small class. No need to use reference.

https://github.com/llvm/llvm-project/pull/82485


More information about the llvm-commits mailing list