mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 01:16:36 +00:00
[ELF] Internalize computeCacheDirectedSortOrder. NFC
and delete an incorremtn comment about ctx.arg.callGraphProfile
This commit is contained in:
parent
c2f7745b4e
commit
8d2b070f07
@ -276,8 +276,8 @@ DenseMap<const InputSectionBase *, int> CallGraphSort::run() {
|
||||
// Sort sections by the profile data using the Cache-Directed Sort algorithm.
|
||||
// The placement is done by optimizing the locality by co-locating frequently
|
||||
// executed code sections together.
|
||||
DenseMap<const InputSectionBase *, int>
|
||||
elf::computeCacheDirectedSortOrder(Ctx &ctx) {
|
||||
static DenseMap<const InputSectionBase *, int>
|
||||
computeCacheDirectedSortOrder(Ctx &ctx) {
|
||||
SmallVector<uint64_t, 0> funcSizes;
|
||||
SmallVector<uint64_t, 0> funcCounts;
|
||||
SmallVector<codelayout::EdgeCount, 0> callCounts;
|
||||
|
@ -15,9 +15,6 @@ namespace lld::elf {
|
||||
struct Ctx;
|
||||
class InputSectionBase;
|
||||
|
||||
llvm::DenseMap<const InputSectionBase *, int>
|
||||
computeCacheDirectedSortOrder(Ctx &);
|
||||
|
||||
llvm::DenseMap<const InputSectionBase *, int>
|
||||
computeCallGraphProfileOrder(Ctx &);
|
||||
} // namespace lld::elf
|
||||
|
@ -1083,7 +1083,6 @@ static void maybeShuffle(Ctx &ctx,
|
||||
// Builds section order for handling --symbol-ordering-file.
|
||||
static DenseMap<const InputSectionBase *, int> buildSectionOrder(Ctx &ctx) {
|
||||
DenseMap<const InputSectionBase *, int> sectionOrder;
|
||||
// Use the rarely used option --call-graph-ordering-file to sort sections.
|
||||
if (!ctx.arg.callGraphProfile.empty())
|
||||
return computeCallGraphProfileOrder(ctx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user