[PATCH] D106213: [lld-macho] Enable copy-on-write for input buffers

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 20:53:50 PDT 2021


int3 added a comment.

Right now, pretty small. (0.3% for the internal build I'm testing, and 0.002% for chromium_framework.) But I'm building upon this to apply ICF to functions that have unwind info, since CompactUnwindEntries use unsigned section relocations -- which embed their addends -- to refer to functions. This has a much larger impact -- 3.2% for the internal build, about doubling the impact that ICF currently has. Not sure about chromium_framework yet, as my implementation is currently crashing.

OTOH, we might want CompactUnwindEntries to eventually use a special-cased subclass of InputSection for performance reasons, and that subclass could just ignore the functionAddress pointer when doing hashing / equality comparison. So deduping code with embedded addends is not a strict prerequisite. However, it does make the initial implementation of unwind ICF simpler, and moreover the code complexity here is largely self-contained -- unlike adding a new subclass, we don't have to add extra handling code throughout the linker.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106213/new/

https://reviews.llvm.org/D106213



More information about the llvm-commits mailing list