[llvm] [MemProf] Extend CallSite information to include potential callees. (PR #130441)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 11 12:01:01 PDT 2025
================
@@ -241,9 +241,11 @@ MemProfRecord IndexedMemProfRecord::toMemProfRecord(
Record.AllocSites.push_back(std::move(AI));
}
- Record.CallSites.reserve(CallSiteIds.size());
- for (CallStackId CSId : CallSiteIds)
- Record.CallSites.push_back(Callback(CSId));
+ Record.CallSites.reserve(CallSites.size());
+ for (const IndexedCallSiteInfo &CS : CallSites) {
+ std::vector<Frame> Frames = Callback(CS.CSId);
+ Record.CallSites.push_back(CallSiteInfo(std::move(Frames), CS.CalleeGuids));
----------------
kazutakahirata wrote:
May I suggest `emplace_back` to construct the new element in place?
https://github.com/llvm/llvm-project/pull/130441
More information about the llvm-commits
mailing list