[llvm] [InstrProf]Merge vtable names from multiple sources in llvm-profdata (PR #90100)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 11:13:20 PDT 2024


https://github.com/minglotus-6 created https://github.com/llvm/llvm-project/pull/90100

Regression test to be added

>From b95cc9b658f71e4390a4c4f852994a19b34ba1e8 Mon Sep 17 00:00:00 2001
From: mingmingl <mingmingl at google.com>
Date: Thu, 25 Apr 2024 11:12:45 -0700
Subject: [PATCH] [InstrProf]Merge vtable names from multiple sources in
 llvm-profdata

---
 llvm/lib/ProfileData/InstrProfWriter.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp
index 7c56cde3e6cedd..a8d770ff5741fe 100644
--- a/llvm/lib/ProfileData/InstrProfWriter.cpp
+++ b/llvm/lib/ProfileData/InstrProfWriter.cpp
@@ -367,6 +367,9 @@ void InstrProfWriter::mergeRecordsFromWriter(InstrProfWriter &&IPW,
   for (auto &I : IPW.BinaryIds)
     addBinaryIds(I);
 
+  for (auto& kv: IPW.VTableNames)
+    addVTableName(kv.getKey());
+
   addTemporalProfileTraces(IPW.TemporalProfTraces,
                            IPW.TemporalProfTraceStreamSize);
 



More information about the llvm-commits mailing list