[llvm] [Instrumentation] Remove an extraneous ArrayRef (NFC) (PR #94890)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 8 21:17:18 PDT 2024


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/94890

We can implicitly convert RemainingVDs to an ArrayRef.  Note that
RemainingVDs is of type SmallVector<InstrProfValueData, 24>.

>From fc97b542a6ab2e1908d5033254be9743cb491085 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 8 Jun 2024 21:03:29 -0700
Subject: [PATCH] [Instrumentation] Remove an extraneous ArrayRef (NFC)

We can implicitly convert RemainingVDs to an ArrayRef.  Note that
RemainingVDs is of type SmallVector<InstrProfValueData, 24>.
---
 llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
index fd0f69eca96e6..fa93f4bd63ce6 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
@@ -402,8 +402,7 @@ bool MemOPSizeOpt::perform(MemOp MO) {
   // If all promoted, we don't need the MD.prof metadata.
   if (SavedRemainCount > 0 || Version != NumVals) {
     // Otherwise we need update with the un-promoted records back.
-    ArrayRef<InstrProfValueData> RemVDs(RemainingVDs);
-    annotateValueSite(*Func.getParent(), *MO.I, RemVDs, SavedRemainCount,
+    annotateValueSite(*Func.getParent(), *MO.I, RemainingVDs, SavedRemainCount,
                       IPVK_MemOPSize, NumVals);
   }
 



More information about the llvm-commits mailing list