[llvm] [Instrumentation] Remove an extraneous ArrayRef (NFC) (PR #94890)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 8 21:17:47 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
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
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);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/94890
More information about the llvm-commits
mailing list