diff options
author | Jan Voung <jvoung@gmail.com> | 2024-08-27 13:53:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 13:53:25 -0400 |
commit | fa4fbaefde8569ca64594fc3845340536ec8eb02 (patch) | |
tree | 29f8266d76a885f580486ff815f0e26d08ec52a9 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 81cd7358a2ce411c99512d055e98d0b9dc119c14 (diff) | |
download | llvm-fa4fbaefde8569ca64594fc3845340536ec8eb02.zip llvm-fa4fbaefde8569ca64594fc3845340536ec8eb02.tar.gz llvm-fa4fbaefde8569ca64594fc3845340536ec8eb02.tar.bz2 |
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).
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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; |