[llvm] 330af6e - Convert argument to reference. (#82741)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 21:28:54 PST 2024


Author: MalaySanghiIntel
Date: 2024-02-24T13:28:50+08:00
New Revision: 330af6ed6194ca5365bc576517c247f545aee1f4

URL: https://github.com/llvm/llvm-project/commit/330af6ed6194ca5365bc576517c247f545aee1f4
DIFF: https://github.com/llvm/llvm-project/commit/330af6ed6194ca5365bc576517c247f545aee1f4.diff

LOG: Convert argument to reference. (#82741)

Avoid copy of large object

Added: 
    

Modified: 
    llvm/lib/CodeGen/ReplaceWithVeclib.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/ReplaceWithVeclib.cpp b/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
index 432c63fb65f492..c67cc57ba675de 100644
--- a/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
+++ b/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
@@ -175,7 +175,7 @@ static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
   // make sure that the operands of the vector function obtained via VFABI match
   // the operands of the original vector instruction.
   if (CI) {
-    for (auto VFParam : OptInfo->Shape.Parameters) {
+    for (auto &VFParam : OptInfo->Shape.Parameters) {
       if (VFParam.ParamKind == VFParamKind::GlobalPredicate)
         continue;
 


        


More information about the llvm-commits mailing list