[Assembler] Emit summary index flags

Differential revision: https://reviews.llvm.org/D74420
This commit is contained in:
evgeny
2020-02-18 17:49:54 +03:00
parent 37c452a289
commit c85055b203
8 changed files with 99 additions and 54 deletions

View File

@@ -3898,20 +3898,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
ArrayRef<uint64_t>{ModuleSummaryIndex::BitcodeSummaryVersion});
// Write the index flags.
uint64_t Flags = 0;
if (Index.withGlobalValueDeadStripping())
Flags |= 0x1;
if (Index.skipModuleByDistributedBackend())
Flags |= 0x2;
if (Index.hasSyntheticEntryCounts())
Flags |= 0x4;
if (Index.enableSplitLTOUnit())
Flags |= 0x8;
if (Index.partiallySplitLTOUnits())
Flags |= 0x10;
if (Index.withAttributePropagation())
Flags |= 0x20;
Stream.EmitRecord(bitc::FS_FLAGS, ArrayRef<uint64_t>{Flags});
Stream.EmitRecord(bitc::FS_FLAGS, ArrayRef<uint64_t>{Index.getFlags()});
for (const auto &GVI : valueIds()) {
Stream.EmitRecord(bitc::FS_VALUE_GUID,