[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 05:08:28 PDT 2022
thakis marked an inline comment as done.
thakis added a comment.
Thanks!
================
Comment at: lld/MachO/Symbols.cpp:103
+ isec = canonical;
+ wasIdenticalCodeFolded = true;
+ }
----------------
thakis wrote:
> 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?
Oh wait the former doesn't work, `defined->isec` is the canonical section.
So did the latter. LMK if that's not what you meant :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123252/new/
https://reviews.llvm.org/D123252
More information about the llvm-commits
mailing list