[llvm] Introduction of typified section in ExtBinary format (PR #166553)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 02:22:02 PST 2025
SergeyShch01 wrote:
Well, let's take load latency profile as an example: a profiled latency value is given to a load.
Load can be pointed to by line:descriminator (probe doesn't work). Also, such feedback can be unrelated to call context (which can be important in LBR case).
In ExtBinary file a new profile type is introduced (say ProfTypeLoadLat) and then it will be possible to have a sub-record inside a function record in SecTypifiedProfile section for this new profile type. This sub-record for ProfTypeLoadLat can contain a list of [line:descriminator, profiled_latency] pairs.
Then, when ExtBinary file is loaded, this new profile is read and [line:descriminator, profiled_latency] pairs are moved to a new map in FunctionSamples (e.g. std::map<LineLocation, ProfiledLoadLat> LoadLatencies).
Then latencies from LoadLatencies can be put to instruction metadata in LLVM IR.
Generally this should look similar to current LBR feedback processing.
https://github.com/llvm/llvm-project/pull/166553
More information about the llvm-commits
mailing list