File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 2424
2525namespace llvm {
2626
27+ // / The structure of the serialized stable function map is as follows:
28+ // / - Number of unique function/module names
29+ // / - Total size of unique function/module names for opt-in skipping
30+ // / - Unique function/module names
31+ // / - Padding to align to 4 bytes
32+ // / - Number of StableFunctionEntries
33+ // / - Hashes of each StableFunctionEntry
34+ // / - Fixed-size fields for each StableFunctionEntry (the order is consistent
35+ // / with the hashes above):
36+ // / - FunctionNameId
37+ // / - ModuleNameId
38+ // / - InstCount
39+ // / - Relative offset to the beginning of IndexOperandHashes for this entry
40+ // / - Total size of variable-sized IndexOperandHashes for lazy-loading support
41+ // / - Variable-sized IndexOperandHashes for each StableFunctionEntry:
42+ // / - Number of IndexOperandHashes
43+ // / - Contents of each IndexOperandHashes
44+ // / - InstIndex
45+ // / - OpndIndex
46+ // / - OpndHash
2747struct StableFunctionMapRecord {
2848 std::unique_ptr<StableFunctionMap> FunctionMap;
2949
Original file line number Diff line number Diff line change @@ -104,18 +104,7 @@ void StableFunctionMapRecord::serialize(
104104 Writer.OS .tell () - NamesByteSizeOffset - sizeof (NamesByteSizeOffset);
105105 PatchItems.emplace_back (NamesByteSizeOffset, &NamesByteSize, 1 );
106106
107- // Write StableFunctionEntries. The structure is:
108- // - Number of StableFunctionEntries
109- // - Hashes of StableFunctionEntries
110- // - Fixed-size fields for each StableFunctionEntry
111- // - FunctionNameId
112- // - ModuleNameId
113- // - InstCount
114- // - Relative offset to IndexOperandHashes
115- // - Total size of variable-sized IndexOperandHashes for lazy-loading support
116- // - Variable-sized IndexOperandHashes for each StableFunctionEntry
117- // - Number of IndexOperandHashes
118- // - Contents of each IndexOperandHashes
107+ // Write StableFunctionEntries whose pointers are sorted.
119108 auto FuncEntries = getStableFunctionEntries (*FunctionMap);
120109 Writer.write <uint32_t >(FuncEntries.size ());
121110 for (const auto *FuncRef : FuncEntries)
You can’t perform that action at this time.
0 commit comments