[all-commits] [llvm/llvm-project] 9115d7: [ELF] Use parallelSort for .rela.dyn

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Dec 12 20:53:19 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9115d75117b57115fe45153e5f38f2c444c0cd91
      https://github.com/llvm/llvm-project/commit/9115d75117b57115fe45153e5f38f2c444c0cd91
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-12-12 (Sun, 12 Dec 2021)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp

  Log Message:
  -----------
  [ELF] Use parallelSort for .rela.dyn

An unstable sort suffices. In a large link (11.06s), this decreases .rela.dyn
writeTo time from 1.52s to 0.81s, resulting in 6% total time speedup (the
benefit will greatly dilute if --pack-dyn-relocs=relr becomes prevailing).

Encoding the dynamic relocations then sorting raw Elf_Rel/Elf_Rela doesn't seem
to improve much (doing that would require code duplicate because of
Elf_Rel/Elf_Rela plus unfortunate mips64le), so don't do that.




More information about the All-commits mailing list