aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-04-23 13:44:31 -0700
committerGitHub <noreply@github.com>2024-04-23 13:44:31 -0700
commitedf733bc321d6e2d0a7dae04ef78d6b291f14a55 (patch)
tree6b3e2ad842e6f035411941e72314e0420a824123 /llvm/lib/CodeGen/MachineInstr.cpp
parent4e9decf294a19d0047da3aada980f24d19d6c62c (diff)
downloadllvm-edf733bc321d6e2d0a7dae04ef78d6b291f14a55.zip
llvm-edf733bc321d6e2d0a7dae04ef78d6b291f14a55.tar.gz
llvm-edf733bc321d6e2d0a7dae04ef78d6b291f14a55.tar.bz2
[memprof] Take Schema into account in PortableMemInfoBlock::serializedSize (#89824)
PortableMemInfoBlock::{serialize,deserialize} take Schema into account, allowing us to serialize/deserialize a subset of the fields. However, PortableMemInfoBlock::serializedSize does not. That is, it assumes that all fields are always serialized and deserialized. In other words, if we choose to serialize/deserialize a subset of the fields, serializedSize would claim more storage than we actually need. This patch fixes the problem by teaching serializedSize to take Schema into account. For now, this patch has no effect on the actual indexed MemProf profile because we serialize/deserialize all fields, but that might change in the future. Aside from check-llvm, I tested this patch by verifying that llvm-profdata generates bit-wise identical files for each version for a large raw MemProf file I have.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions