[compiler-rt] [llvm] [TypeProf][InstrPGO] Introduce raw and instr profile format change for type profiling. (PR #81691)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 08:44:16 PST 2024
================
@@ -455,12 +455,12 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
Header.MemProfOffset = 0;
Header.BinaryIdOffset = 0;
Header.TemporalProfTracesOffset = 0;
+ Header.VTableNamesOffset = 0;
int N = sizeof(IndexedInstrProf::Header) / sizeof(uint64_t);
- // Only write out all the fields except 'HashOffset', 'MemProfOffset',
- // 'BinaryIdOffset' and `TemporalProfTracesOffset`. We need to remember the
- // offset of these fields to allow back patching later.
- for (int I = 0; I < N - 4; I++)
+ // Only write out the first four fields. We need to remember the offset of the
+ // remaining fields to allow back patching later.
+ for (int I = 0; I < 4; I++)
----------------
snehasish wrote:
Should this be 5 - i.e. `Magic, Version, Unused, HashType, HashOffset`? If so can you also make sure we have a test to catch this.
https://github.com/llvm/llvm-project/pull/81691
More information about the llvm-commits
mailing list