[all-commits] [llvm/llvm-project] cc88a5: [lld-macho, NFC] Switch to increasing priorities
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jan 10 09:32:25 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cc88a5e61578e58afdd8ef4e9f1b7cd10d77fba3
https://github.com/llvm/llvm-project/commit/cc88a5e61578e58afdd8ef4e9f1b7cd10d77fba3
Author: Fangrui Song <i at maskray.me>
Date: 2025-01-10 (Fri, 10 Jan 2025)
Changed paths:
M lld/Common/BPSectionOrdererBase.cpp
M lld/MachO/BPSectionOrderer.cpp
M lld/MachO/BPSectionOrderer.h
M lld/MachO/SectionPriorities.cpp
M lld/MachO/SectionPriorities.h
M lld/MachO/Writer.cpp
M lld/include/lld/Common/BPSectionOrdererBase.h
Log Message:
-----------
[lld-macho,NFC] Switch to increasing priorities
--order_file, call graph profile, and BalancedPartitioning currently
build the section order vector by decreasing priority (from SIZE_MAX to
0). However, it's conventional to use an increasing key (see
OutputSection::inputOrder).
Switch to increasing priorities, remove the global variable
highestAvailablePriority, and remove the highestAvailablePriority
parameter from BPSectionOrderer. Change size_t to int.
This improves consistenty with the ELF and COFF ports. The ELF port
utilizes negative priorities for --symbol-ordering-file and call graph
profile, and non-negative priorities for --shuffle-sections (no Mach-O
counterpart yet).
Pull Request: https://github.com/llvm/llvm-project/pull/121727
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