[PATCH] D133780: [lld-macho] Have ICF dedup explicitly-defined selrefs
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 15:00:09 PDT 2022
int3 added inline comments.
================
Comment at: lld/MachO/ICF.cpp:417-423
+ bool isFoldableWithAddendsRemoved = isCfStringSection(isec) ||
+ isClassRefsSection(isec) ||
+ isSelRefsSection(isec);
+ // __objc_selrefs is typically marked as no_dead_strip but that doesn't stop
+ // ld64 from folding it
+ bool hasFoldableFlags = (isSelRefsSection(isec) ||
+ sectionType(isec->getFlags()) == MachO::S_REGULAR);
----------------
thakis wrote:
> Roger wrote:
> > I really appreciate pulling out these boolean expressions into their own variables to give a name to what they represent. If it can be done any further, I'd really encourage it :)
> +1, but maybe some of that could land in a separate (unreviewed, behavior-preserving) commit so it's easier to see the behavior change in this diff :)
split them out into https://github.com/llvm/llvm-project/commit/8d4ca09d068d66d13b258ebccdb9470b50fff881 :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133780/new/
https://reviews.llvm.org/D133780
More information about the llvm-commits
mailing list