Path: blob/main/contrib/llvm-project/lld/MachO/BPSectionOrderer.h
213726 views
//===- BPSectionOrderer.h -------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// This file uses Balanced Partitioning to order sections to improve startup9/// time and compressed size.10///11//===----------------------------------------------------------------------===//1213#ifndef LLD_MACHO_BPSECTION_ORDERER_H14#define LLD_MACHO_BPSECTION_ORDERER_H1516#include "llvm/ADT/DenseMap.h"17#include "llvm/ADT/StringRef.h"1819namespace lld::macho {20class InputSection;2122/// Run Balanced Partitioning to find the optimal function and data order to23/// improve startup time and compressed size.24///25/// It is important that .subsections_via_symbols is used to ensure functions26/// and data are in their own sections and thus can be reordered.27llvm::DenseMap<const InputSection *, int>28runBalancedPartitioning(llvm::StringRef profilePath,29bool forFunctionCompression, bool forDataCompression,30bool compressionSortStartupFunctions, bool verbose);3132} // namespace lld::macho3334#endif353637