mirror-llvm-project/lld/test
Peter Rong 84afdb4771
[lld][MachO] Avoid quadratic iteration over already-folded symbols during ICF (#213339)
`ConcatInputSection::foldIdentical()` clears the folded functions
`originalUnwindEntry`.
However, it cleared every symbol: with N members, the repeated clearing
is **O(N²)**.
This is redundant: we should only remove the incoming `copy->symbols`.

This patch moves the removing loop ahead and adds more clear comments on
why we need to skip the first element.
Also added a new `lld/test/MachO/icf-scale-same-class.s` with 500K
identical functions as a stress test, which would've taken minutes to
link, and less than a second with the patch.

Testing on real-world app (IRPGO instrumentation + ICF) find that we
achieved a 19x speed up (1:14:42 -> 3:55)
2026-08-01 12:44:24 -07:00
..
COFF [LLD] [COFF] Fix linking directly against an ARM64X DLL without import library (#210311) 2026-07-17 17:30:31 +02:00
ELF [ELF] Retain .rela.dyn for PPC64 PI long-branch thunks (#212078) 2026-08-01 17:55:34 +00:00
MachO [lld][MachO] Avoid quadratic iteration over already-folded symbols during ICF (#213339) 2026-08-01 12:44:24 -07:00
MinGW [LLD] [MinGW] Implement --{push,pop}-state (#197748) 2026-05-15 15:16:20 +03:00
Unit Revert "[lit] cleanup unused imports" (#144054) 2025-06-13 08:16:09 -07:00
wasm [WebAssembly] Add a newline at end of file (#212674) 2026-07-29 03:49:22 +00:00
CMakeLists.txt [lld] Reject --read-workers when lld is built without thread support (#163925) 2025-10-17 08:35:23 +00:00
lit.cfg.py [lld] Remove ability to use the external shell 2026-07-14 20:25:57 -07:00
lit.site.cfg.py.in [lld] Reject --read-workers when lld is built without thread support (#163925) 2025-10-17 08:35:23 +00:00