[llvm] [memprof] Speed up caller-callee pair extraction (PR #116184)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 08:53:26 PST 2024
================
@@ -1303,6 +1303,10 @@ Error IndexedMemProfReader::deserializeV3(const unsigned char *Start,
FrameBase = Ptr;
CallStackBase = Start + CallStackPayloadOffset;
+ // Compute the number of elements in the radix tree array.
+ RadixTreeSize = (RecordPayloadOffset - CallStackPayloadOffset) /
----------------
kazutakahirata wrote:
Sure. I'll add a comment. By the way, `RadixTreeSize` is used to reserve enough bits in a `BitVector`; I'm not computing the exact number of elements. If I get a couple of extra elements because of padding, that's totally OK. I'll include this in the comment also.
https://github.com/llvm/llvm-project/pull/116184
More information about the llvm-commits
mailing list