[PATCH] D121052: [lld-macho][nfc] Reduce size of icfEqClass hash
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 6 23:59:49 PST 2022
int3 marked an inline comment as done.
int3 added a comment.
both the changes you commented on were accidentally included in this diff... will split them out
================
Comment at: lld/MachO/ICF.cpp:280
- if (auto *dylibSym = dyn_cast<DylibSymbol>(sym))
- hash += dylibSym->stubsHelperIndex;
- else if (auto *defined = dyn_cast<Defined>(sym)) {
----------------
thakis wrote:
> what happened to the dylibSym branch?
oops, I didn't intend to fold that change into this commit. I'll commit this separately
but as for the rationale... the existing hashing of `stubsHelperIndex` is actually a no-op because ICF runs before dylib symbols get their stubs index assigned. I guess we could consider hashing the name + filename of the DylibSymbol instead, but I'm not sure the overhead's worth it... also LLD/ELF only hashes their Defined symbols as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121052/new/
https://reviews.llvm.org/D121052
More information about the llvm-commits
mailing list