#include "BPSectionOrderer.h"
#include "InputSection.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/BalancedPartitioning.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/xxhash.h"
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacelld::macho;
static StringRef getRootSymbol(StringRef Name) { … }
static uint64_t getRelocHash(StringRef kind, uint64_t sectionIdx,
uint64_t offset, uint64_t addend) { … }
static uint64_t
getRelocHash(const Reloc &reloc,
const DenseMap<const InputSection *, uint64_t> §ionToIdx) { … }
static void constructNodesForCompression(
const SmallVector<const InputSection *> §ions,
const DenseMap<const InputSection *, uint64_t> §ionToIdx,
const SmallVector<unsigned> §ionIdxs,
std::vector<BPFunctionNode> &nodes,
DenseMap<unsigned, SmallVector<unsigned>> &duplicateSectionIdxs,
BPFunctionNode::UtilityNodeT &maxUN) { … }
DenseMap<const InputSection *, size_t> lld::macho::runBalancedPartitioning(
size_t &highestAvailablePriority, StringRef profilePath,
bool forFunctionCompression, bool forDataCompression, bool verbose) { … }