[lld] [lld][InstrProf] Profile guided function order (PR #96268)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 12:19:15 PDT 2024
================
@@ -352,7 +353,14 @@ void macho::PriorityBuilder::parseOrderFile(StringRef path) {
DenseMap<const InputSection *, size_t>
macho::PriorityBuilder::buildInputSectionPriorities() {
DenseMap<const InputSection *, size_t> sectionPriorities;
- if (config->callGraphProfileSort) {
+ if (!config->profileGuidedFunctionOrderPath.empty() ||
+ config->functionOrderForCompression || config->dataOrderForCompression) {
+ TimeTraceScope timeScope("Balanced Partitioning Section Orderer");
+ sectionPriorities = runBalancedPartitioning(
----------------
ellishg wrote:
I could also emit an error if the user tries to supply `--irpgo-profile-sort` and `-order-file`. Otherwise we don't want to silently ignore the orderfile.
https://github.com/llvm/llvm-project/pull/96268
More information about the llvm-commits
mailing list