Skip to content

Commit 572e558

Browse files
committed
Address comments
1 parent 17b3989 commit 572e558

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static cl::opt<bool> WriteRelBFToSummary(
105105
// TODO: Currently this controls writing context of the allocation info records,
106106
// which are larger and more expensive, but we should do this for the callsite
107107
// records as well.
108+
// FIXME: Convert to a const once this has undergone more sigificant testing.
108109
static cl::opt<bool>
109110
CombinedIndexMemProfContext("combined-index-memprof-context", cl::Hidden,
110111
#ifndef NDEBUG
@@ -4366,6 +4367,9 @@ static void writeFunctionHeapProfileRecords(
43664367
Record.push_back(AI.Versions.size());
43674368
for (auto &MIB : AI.MIBs) {
43684369
Record.push_back((uint8_t)MIB.AllocType);
4370+
// The per-module summary always needs to include the alloc context, as we
4371+
// use it during the thin link. For the combined index it is optional (see
4372+
// comments where CombinedIndexMemProfContext is defined).
43694373
if (PerModule || CombinedIndexMemProfContext) {
43704374
// Record the index into the radix tree array for this context.
43714375
assert(CallStackCount <= CallStackPos.size());

0 commit comments

Comments
 (0)