Skip to content

Commit 1d3f568

Browse files
committed
Ignore callGraphProfile when BP orderer is used
1 parent 91fe6b3 commit 1d3f568

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lld/ELF/BPSectionOrderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct BPOrdererELF : lld::BPOrderer<BPOrdererELF> {
7474
};
7575
} // namespace
7676

77-
DenseMap<const InputSectionBase *, int> lld::elf::runBalancedPartitioning(
77+
DenseMap<const InputSectionBase *, int> elf::runBalancedPartitioning(
7878
Ctx &ctx, StringRef profilePath, bool forFunctionCompression,
7979
bool forDataCompression, bool compressionSortStartupFunctions,
8080
bool verbose) {

lld/ELF/Writer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,9 +1092,9 @@ static DenseMap<const InputSectionBase *, int> buildSectionOrder(Ctx &ctx) {
10921092
ctx.arg.bpDataOrderForCompression,
10931093
ctx.arg.bpCompressionSortStartupFunctions,
10941094
ctx.arg.bpVerboseSectionOrderer);
1095-
}
1096-
if (!ctx.arg.callGraphProfile.empty())
1095+
} else if (!ctx.arg.callGraphProfile.empty()) {
10971096
sectionOrder = computeCallGraphProfileOrder(ctx);
1097+
}
10981098

10991099
if (ctx.arg.symbolOrderingFile.empty())
11001100
return sectionOrder;

0 commit comments

Comments
 (0)