[llvm] [memprof] Add IndexedMemProfReader::getMemProfCallerCalleePairs (PR #115807)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 19:31:43 PST 2024


================
@@ -1666,6 +1666,35 @@ IndexedMemProfReader::getMemProfRecord(const uint64_t FuncNameHash) const {
               memprof::MaximumSupportedVersion));
 }
 
+DenseMap<uint64_t, SmallVector<memprof::CallEdgeTy, 0>>
+IndexedMemProfReader::getMemProfCallerCalleePairs() const {
+  assert(MemProfRecordTable);
+  assert(Version == memprof::Version3);
+
+  memprof::LinearFrameIdConverter FrameIdConv(FrameBase);
+  memprof::CallerCalleePairExtractor Extractor(CallStackBase, FrameIdConv);
+
+  // Collect the set of linear call stack IDs.  Since we expect a lot of
+  // duplicates, we first collect them in the form a bit vector before
----------------
teresajohnson wrote:

Should this be "form *of* a bit vector"?  But I'm not sure I follow where a bit vector comes in. Can you correct this comment or otherwise make it clearer?

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


More information about the llvm-commits mailing list