Skip to content

Conversation

kazutakahirata
Copy link
Contributor

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

We can implicitly convert RemainingVDs to an ArrayRef.  Note that
RemainingVDs is of type SmallVector<InstrProfValueData, 24>.
@llvmbot llvmbot added PGO Profile Guided Optimizations llvm:transforms labels Jun 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 9, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/94890.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp (+1-2)
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);
   }
 

@llvmbot
Copy link
Member

llvmbot commented Jun 9, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/94890.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp (+1-2)
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);
   }
 

@kazutakahirata kazutakahirata requested a review from MaskRay June 9, 2024 04:25
@kazutakahirata kazutakahirata merged commit f7ccb32 into llvm:main Jun 9, 2024
@kazutakahirata kazutakahirata deleted the cleanup_value_profiling_extra_ArrayRef branch June 9, 2024 16:32
@HerrCai0907 HerrCai0907 mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:transforms PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants