[llvm] [memprof] Use CSId to construct MemProfRecord (PR #88362)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 09:27:14 PDT 2024
================
@@ -183,6 +183,28 @@ std::string getBuildIdString(const SegmentEntry &Entry) {
}
} // namespace
+MemProfReader::MemProfReader(
+ llvm::DenseMap<FrameId, Frame> FrameIdMap,
+ llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord> ProfData)
+ : IdToFrame(std::move(FrameIdMap)),
+ FunctionProfileData(std::move(ProfData)) {
+ // Populate CSId in each IndexedAllocationInfo and IndexedMemProfRecord
+ // while storing CallStack in CSIdToCallStack.
+ for (auto &[GUID, Record] : FunctionProfileData) {
+ (void)GUID;
----------------
snehasish wrote:
Maybe not worth using a structured binding if we don't use one item of the pair?
https://github.com/llvm/llvm-project/pull/88362
More information about the llvm-commits
mailing list