[llvm] [memprof] Group MemProf data structures into a struct (NFC) (PR #92360)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 10:34:05 PDT 2024


================
@@ -51,18 +51,7 @@ class InstrProfWriter {
   SmallVector<TemporalProfTraceTy> TemporalProfTraces;
   std::mt19937 RNG;
 
-  // A map to hold memprof data per function. The lower 64 bits obtained from
-  // the md5 hash of the function name is used to index into the map.
-  llvm::MapVector<GlobalValue::GUID, memprof::IndexedMemProfRecord>
-      MemProfRecordData;
-  // A map to hold frame id to frame mappings. The mappings are used to
-  // convert IndexedMemProfRecord to MemProfRecords with frame information
-  // inline.
-  llvm::MapVector<memprof::FrameId, memprof::Frame> MemProfFrameData;
-
-  // A map to hold call stack id to call stacks.
-  llvm::MapVector<memprof::CallStackId, llvm::SmallVector<memprof::FrameId>>
-      MemProfCallStackData;
+  memprof::IndexedMemProfData MemProfData;
----------------
kazutakahirata wrote:

Done.

https://github.com/llvm/llvm-project/pull/92360


More information about the llvm-commits mailing list