[PATCH] D123252: [lld/mac] Don't emit stabs entries for functions folded during ICF
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 04:40:48 PDT 2022
thakis added inline comments.
================
Comment at: lld/MachO/Symbols.cpp:103
+ isec = canonical;
+ wasIdenticalCodeFolded = true;
+ }
----------------
int3 wrote:
> How do you feel about doing this work in `ConcatInputSection::foldIdentical` instead? We already toggle `ConcatInputSection::wasCoalesced` there, so this would fit in nicely.
>
> (We could also perform the canonicalization of `Defined::isec` there -- I'd previously put it here because InputSections didn't use to hold references to their symbols.)
Do you mean giving ConcatInputSection a bool for this and setting that bool instead of giving Defined a bit, and then querying `defined->isec->wasIdenticalCodeFolded` instead of `defined->wasIdenticalCodeFolded`? Or do you mean keeping the bit on Defined and make `ConcatInputSection::foldIdentical` walk `symbols` and set the bit on all the section's symbols?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123252/new/
https://reviews.llvm.org/D123252
More information about the llvm-commits
mailing list