Lines Matching defs:LTO
1 //===-LTO.cpp - LLVM Link Time Optimizer ----------------------------------===//
9 // This file implements functions and classes used to support LTO.
13 #include "llvm/LTO/LTO.h"
34 #include "llvm/LTO/LTOBackend.h"
35 #include "llvm/LTO/SummaryBasedOptimizations.h"
76 /// Enable global value internalization in LTO.
79 cl::desc("Enable global value internalization in LTO"));
112 // Include the parts of the LTO configuration that affect code generation.
502 // Additionally, at least for the new LTO API, case 2 will only happen if
505 // Likely, users of the legacy LTO API are similar, however, currently there
506 // are llvm-lto based tests of the legacy LTO API that do not mark
569 // Skip symbols that are irrelevant to LTO. Note that this condition needs
570 // to match the one in Skip() in LTO::addRegularLTO().
590 LTO::RegularLTOState::RegularLTOState(unsigned ParallelCodeGenParallelismLevel,
598 LTO::ThinLTOState::ThinLTOState(ThinBackend Backend)
605 LTO::LTO(Config Conf, ThinBackend Backend,
614 LTO::~LTO() = default;
618 void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
707 Error LTO::add(std::unique_ptr<InputFile> Input,
729 Error LTO::addModule(InputFile &Input, unsigned ModI,
750 "unified LTO compilation must use "
776 // Regular LTO module summaries are added to a dummy module that represents
777 // the combined regular LTO module.
789 // regular LTO modules, in case we are in a mixed-LTO mode (both regular
790 // and thin LTO modules) compilation. Since the regular LTO module will be
793 // in the regular LTO module without this cleanup.
814 // Add a regular LTO object to the link.
815 // The resulting module needs to be linked into the combined LTO module with
817 Expected<LTO::RegularLTOState::AddedModule>
818 LTO::addRegularLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
833 // If cfi.functions is present and we are in regular LTO mode, LowerTypeTests
859 // InputFile::create we omit some symbols that are irrelevant to LTO. The
972 Error LTO::linkRegularLTO(RegularLTOState::AddedModule Mod,
1010 Error LTO::addThinLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
1089 unsigned LTO::getMaxTasks() const {
1098 Error LTO::checkPartiallySplit() {
1111 // merged regular LTO module IR.
1117 "inconsistent LTO Unit splitting (recompile with -fsplit-lto-unit)",
1133 "inconsistent LTO Unit splitting (recompile with -fsplit-lto-unit)",
1140 Error LTO::run(AddStreamFn AddStream, FileCache Cache) {
1205 // unconditionally. If supports-hot-cold-new was not enabled in the LTO
1229 Error LTO::runRegularLTO(AddStreamFn AddStream) {
1235 LLVM_DEBUG(dbgs() << "Running regular LTO\n");
1240 // Finalize linking of regular LTO modules containing summaries now that
1247 // Ensure we don't have inconsistently split LTO units with type tests.
1248 // FIXME: this checks both LTO and ThinLTO. It happens to work as we take
1330 // These linkages are seen in Unified regular LTO, because the process
1331 // of creating split LTO units introduces symbols with that linkage into
1333 // compile this module, but Unified Regular LTO processes both
1334 // modules created by the splitting process as regular LTO modules.
1361 SmallVector<const char *> LTO::getRuntimeLibcallSymbols(const Triple &TT) {
1678 Error LTO::runThinLTO(AddStreamFn AddStream, FileCache Cache,
1765 // performing IR-based WPD in hybrid regular/thin LTO mode).
1780 // we must apply DCE consistently with the full LTO module in order to avoid
1805 // Any functions referenced by the jump table in the regular LTO object must