[PATCH] D133780: [lld-macho] Have ICF dedup explicitly-defined selrefs

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 08:30:48 PDT 2022


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a reviewer: ributzka.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is what ld64 does (though it doesn't use ICF to do this; instead it
always dedups selrefs by default).

We'll want to dedup implicitly-defined selrefs as well, but I will leave
that for future work.

Additionally, I'm not *super* happy with the current LLD implementation
because I think it is rather janky and inefficient. But at least it
moves us toward the goal of closing the size gap with ld64. I've
described ideas for cleaning up our implementation here:
https://github.com/llvm/llvm-project/issues/57714


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133780

Files:
  lld/MachO/ICF.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputSection.cpp
  lld/MachO/InputSection.h
  lld/test/MachO/objc-selrefs.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133780.459762.patch
Type: text/x-patch
Size: 8289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220913/890549b8/attachment.bin>


More information about the llvm-commits mailing list