[all-commits] [llvm/llvm-project] d5c1d7: [ELF] Making cdsort default for function reorderin...

spupyrev via All-commits all-commits at lists.llvm.org
Tue Oct 10 09:06:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5c1d735ad9e28d9a0e5cddc70809d069a4360b5
      https://github.com/llvm/llvm-project/commit/d5c1d735ad9e28d9a0e5cddc70809d069a4360b5
  Author: spupyrev <spupyrev at users.noreply.github.com>
  Date:   2023-10-10 (Tue, 10 Oct 2023)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/docs/ld.lld.1
    M lld/test/ELF/cgprofile-bad-clusters.s
    M lld/test/ELF/cgprofile-icf.s
    M lld/test/ELF/cgprofile-print.s
    M lld/test/ELF/cgprofile-rela.test
    M lld/test/ELF/cgprofile-reproduce.s
    M lld/test/ELF/cgprofile-txt.s

  Log Message:
  -----------
  [ELF] Making cdsort default for function reordering (#68638)

CDSort function reordering outperforms the existing default heuristic (
hfsort/C^3) in terms of the performance of generated binaries while
being (almost) as fast. Thus, the suggestion is to change the default.
The speedup is up to 1.5% perf for large front-end binaries, and can be
moderate/neutral for "small" benchmarks.

High-level **perf impact** on two selected binaries:
clang-10 binary (built with LTO+AutoFDO/CSSPGO): wins on top of C^3 in
[0.3%..0.8%]
rocksDB-8 binary (built with LTO+CSSPGO): wins on top of C^3 in
[0.8%..1.5%]

More detailed measurements on the clang binary is at
[here](https://reviews.llvm.org/D152834#4445042)




More information about the All-commits mailing list