[MemProf] Templatize CallStackRadixTreeBuilder (NFC) (#117014)
commite14827f0828d14ef17ab76316e8449d1b76e2617
authorTeresa Johnson <tejohnson@google.com>
Wed, 20 Nov 2024 18:08:58 +0000 (20 10:08 -0800)
committerGitHub <noreply@github.com>
Wed, 20 Nov 2024 18:08:58 +0000 (20 10:08 -0800)
treecdc599c1cb9f81ae0b58497367f109ff5c1e1ac8
parent6473a36edc571cf0734a2e8d4354e332efb170e9
[MemProf] Templatize CallStackRadixTreeBuilder (NFC) (#117014)

Prepare for usage in the bitcode reader/writer where we already have a
LinearFrameId:
- templatize input frame id type in CallStackRadixTreeBuilder
- templatize input frame id type in computeFrameHistogram
- make the map from FrameId to LinearFrameId optional

We plan to use the same radix format in the ThinLTO summary records,
where we already have a LinearFrameId.
llvm/include/llvm/ProfileData/MemProf.h
llvm/lib/ProfileData/InstrProfWriter.cpp
llvm/lib/ProfileData/MemProf.cpp
llvm/unittests/ProfileData/MemProfTest.cpp