[all-commits] [llvm/llvm-project] fd609e: [lld] Glob-based BP compression sort groups (#185661)
Zhaoxuan Jiang via All-commits
all-commits at lists.llvm.org
Wed Apr 1 17:53:29 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd609e5d33eae0df48d37a215f13a78bab3f8ebb
https://github.com/llvm/llvm-project/commit/fd609e5d33eae0df48d37a215f13a78bab3f8ebb
Author: Zhaoxuan Jiang <jiangzhaoxuan94 at gmail.com>
Date: 2026-04-01 (Wed, 01 Apr 2026)
Changed paths:
M lld/ELF/BPSectionOrderer.cpp
M lld/ELF/BPSectionOrderer.h
M lld/ELF/Config.h
M lld/ELF/Driver.cpp
M lld/ELF/Options.td
M lld/ELF/Writer.cpp
M lld/MachO/BPSectionOrderer.cpp
M lld/MachO/BPSectionOrderer.h
M lld/MachO/Config.h
M lld/MachO/Driver.cpp
M lld/MachO/Options.td
M lld/MachO/SectionPriorities.cpp
M lld/docs/ReleaseNotes.rst
A lld/include/lld/Common/BPSectionOrdererBase.h
M lld/include/lld/Common/BPSectionOrdererBase.inc
A lld/test/ELF/bp-section-orderer-cold.s
M lld/test/ELF/bp-section-orderer.s
M lld/test/MachO/bp-section-orderer-errs.s
A lld/test/MachO/compression-order-sections.s
Log Message:
-----------
[lld] Glob-based BP compression sort groups (#185661)
Add
--bp-compression-sort-section=<glob>[=<layout_priority>[=<match_priority>]]
to let users split input sections into multiple compression groups, run
balanced partitioning independently per group, and leave out sections
that are poor candidates for BP. This replaces the old coarse
--bp-compression-sort with a more explicit, user-controlled one.
In ELF, the glob matches input section names (.text.unlikely.cold1). In
Mach-O, it matches the concatenated segment+section name (__TEXT__text).
layout_priority controls group placement in the final layout.
match_priority resolves conflicts when multiple globs match the same
section: explicit priority beats positional matching, and among
positional specs the last match wins.
A CRTP hook getCompressionSubgroupKey() allows backends to further
subdivide glob groups into independent BP instances. This allows Mach-O
backend to separate cold functions via N_COLD_FUNC in the future.
The deprecated --bp-compression-sort option keeps its existing
function/data behavior by assigning sections to fixed legacy groups.
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