[PATCH] D105044: [lld-macho] Move ICF earlier to avoid emitting redundant binds
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 09:26:21 PDT 2021
oontvoo added inline comments.
================
Comment at: lld/MachO/Driver.cpp:980
+ for (const SubsectionEntry &entry : map) {
+ if (auto isec = dyn_cast<ConcatInputSection>(entry.isec)) {
+ if (isec->isCoalescedWeak())
----------------
(clang-tidy suggestion)
================
Comment at: lld/MachO/Driver.cpp:988
+ }
+ isec->outSecOff = ++inputOrder;
+ inputSections.push_back(isec);
----------------
why not leave it as 0-based rather than 1?
not saying it's wrong ... just curious :)
================
Comment at: lld/MachO/UnwindInfoSection.cpp:133
+ : SyntheticSection(segment_names::text, section_names::unwindInfo) {
+ align = 4;
+ compactUnwindSection =
----------------
why "4"? is this not platform dependent?
================
Comment at: lld/MachO/Writer.cpp:615
+ // too...
+ auto referentIsec = r.referent.get<InputSection *>();
+ r.referent = referentIsec->canonical();
----------------
================
Comment at: lld/MachO/Writer.cpp:894
+ ConcatOutputSection *&osec = concatOutputSections[names];
+ if (osec == nullptr)
+ osec = make<ConcatOutputSection>(names.second);
----------------
nit: just for consistency
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105044/new/
https://reviews.llvm.org/D105044
More information about the llvm-commits
mailing list