[all-commits] [llvm/llvm-project] 3736d0: [ELF] Optimize -z combreloc

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Jan 15 22:34:05 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3736d0854a003ef7896a23014857a76472128342
      https://github.com/llvm/llvm-project/commit/3736d0854a003ef7896a23014857a76472128342
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-01-15 (Sat, 15 Jan 2022)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp
    M lld/test/ELF/mips-32.s
    M lld/test/ELF/mips-64.s

  Log Message:
  -----------
  [ELF] Optimize -z combreloc

Sorting dynamic relocations is a bottleneck. Simplifying the comparator improves
performance. Linking clang is 4~5% faster with --threads=8.

This change may shuffle R_MIPS_REL32 for Mips and is a NFC for non-Mips.




More information about the All-commits mailing list