From fa4fbaefde8569ca64594fc3845340536ec8eb02 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Tue, 27 Aug 2024 13:53:25 -0400 Subject: Reapply: Use an abbrev to reduce size of VALUE_GUID records in ThinLTO summaries (#106165) This retries #90692 which was reverted previously due to issues with lld-available being set, even if the copy of lld is not built from source. This does not change any code compared to #90692 to address the lld-available issue. The main change w.r.t, lld-available is xfailing tests in PR #99056 (until a longer term fix is available). --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 6767c7c..974a050 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -7606,9 +7606,14 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) { TheIndex.setFlags(Record[0]); break; } - case bitc::FS_VALUE_GUID: { // [valueid, refguid] + case bitc::FS_VALUE_GUID: { // [valueid, refguid_upper32, refguid_lower32] uint64_t ValueID = Record[0]; - GlobalValue::GUID RefGUID = Record[1]; + GlobalValue::GUID RefGUID; + if (Version >= 11) { + RefGUID = Record[1] << 32 | Record[2]; + } else { + RefGUID = Record[1]; + } ValueIdToValueInfoMap[ValueID] = std::make_tuple( TheIndex.getOrInsertValueInfo(RefGUID), RefGUID, RefGUID); break; -- cgit v1.1