[PATCH] D88151: [LLD][ELF] Fix inconsistencies with ICF equality class
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 08:44:10 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/ICF.cpp:225
+ // Set MSB to 1 to avoid equality with "unique" IDs.
+ uint32_t eqClass = mid | (1U << 31);
for (size_t i = begin; i < mid; ++i)
----------------
There is indeed one existing `1U << 31` ... but there is no accompanying `& 0x7fffffff` I would expect.. So I start to wonder its merit..
================
Comment at: lld/ELF/ICF.cpp:476
part.ehFrame->iterateFDEWithLSDA<ELFT>(
- [&](InputSection &s) { s.eqClass[0] = ++uniqueId; });
+ [&](InputSection &s) { s.eqClass[0] = s.eqClass[1] = ++uniqueId; });
----------------
This is unneeded. combineRelocHashes updates eqClass[1]
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88151/new/
https://reviews.llvm.org/D88151
More information about the llvm-commits
mailing list