[all-commits] [llvm/llvm-project] 0154dc: [ELF] Add BPSectionOrderer options (#120514)

Pengying Xu via All-commits all-commits at lists.llvm.org
Sun Feb 2 17:33:40 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0154dce8d39d2688b09f4e073fe601099a399365
      https://github.com/llvm/llvm-project/commit/0154dce8d39d2688b09f4e073fe601099a399365
  Author: Pengying Xu <xpy66swsry at gmail.com>
  Date:   2025-02-02 (Sun, 02 Feb 2025)

  Changed paths:
    A lld/ELF/BPSectionOrderer.cpp
    A lld/ELF/BPSectionOrderer.h
    M lld/ELF/CMakeLists.txt
    M lld/ELF/Config.h
    M lld/ELF/Driver.cpp
    M lld/ELF/Options.td
    M lld/ELF/Writer.cpp
    M lld/include/lld/Common/BPSectionOrdererBase.inc
    A lld/test/ELF/bp-section-orderer-stress.s
    A lld/test/ELF/bp-section-orderer.s

  Log Message:
  -----------
  [ELF] Add BPSectionOrderer options (#120514)

Add new ELF linker options for profile-guided section ordering
optimizations:

- `--irpgo-profile=<file>`: Read IRPGO profile data for use with startup
and compression optimizations
- `--bp-startup-sort={none,function}`: Order sections based on profile
data to improve star tup time
- `--bp-compression-sort={none,function,data,both}`: Order sections
using balanced partitioning to improve compressed size
- `--bp-compression-sort-startup-functions`: Additionally optimize
startup functions for compression
- `--verbose-bp-section-orderer`: Print statistics about balanced
partitioning section ordering

Thanks to the @ellishg, @thevinster, and their team's work.

---------

Co-authored-by: Fangrui Song <i at maskray.me>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list