[llvm] Introduction of typified section in ExtBinary format (PR #166553)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 11 02:54:09 PST 2025
SergeyShch01 wrote:
> How will be `line:discriminator` represented in the serialized profile? Would it make sense to support sharing the storage of same `line:discriminator` in different (LBR, load latency above) type sections?
The default serialization method is as follows:
void LineLocation::serialize(raw_ostream &OS) const {
encodeULEB128(LineOffset, OS);
encodeULEB128(Discriminator, OS);
}
Assuming that the encoded size is expected to be small (as LineOffset and Discriminator are usually small) and that the shared line:discriminator pairs are expected to be reused unfrequently by different profile types (as different profile types are expected to relate to instructions of different types which usually correspond to different line:discriminator pairs) I would say that introduction of the shared `line:discriminator` currently doesn't look reasonable.
In future the situation could be different and such storage could be supported (this shouldn't be difficult if we can easily introduce new profile types).
https://github.com/llvm/llvm-project/pull/166553
More information about the llvm-commits
mailing list