[llvm] Convert argument to reference. (PR #82741)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 00:26:05 PST 2024
https://github.com/MalaySanghiIntel created https://github.com/llvm/llvm-project/pull/82741
Avoid copy of large object
>From 72bd19d57457f7bc8c2ad0c258e8f6b54e92ad9b Mon Sep 17 00:00:00 2001
From: Malay Sanghi <malay.sanghi at intel.com>
Date: Fri, 23 Feb 2024 00:19:52 -0800
Subject: [PATCH] Convert argument to reference
Avoid copy of large object
---
llvm/lib/CodeGen/ReplaceWithVeclib.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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