File indexing completed on 2026-05-10 08:44:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef LLVM_LTO_LTOBACKEND_H
0017 #define LLVM_LTO_LTOBACKEND_H
0018
0019 #include "llvm/ADT/MapVector.h"
0020 #include "llvm/IR/DiagnosticInfo.h"
0021 #include "llvm/IR/ModuleSummaryIndex.h"
0022 #include "llvm/LTO/LTO.h"
0023 #include "llvm/Support/MemoryBuffer.h"
0024 #include "llvm/Target/TargetOptions.h"
0025 #include "llvm/Transforms/IPO/FunctionImport.h"
0026
0027 namespace llvm {
0028
0029 class BitcodeModule;
0030 class Error;
0031 class Module;
0032 class Target;
0033
0034 namespace lto {
0035
0036
0037 bool opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
0038 bool IsThinLTO, ModuleSummaryIndex *ExportSummary,
0039 const ModuleSummaryIndex *ImportSummary,
0040 const std::vector<uint8_t> &CmdArgs);
0041
0042
0043
0044 Error backend(const Config &C, AddStreamFn AddStream,
0045 unsigned ParallelCodeGenParallelismLevel, Module &M,
0046 ModuleSummaryIndex &CombinedIndex);
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 Error thinBackend(const Config &C, unsigned Task, AddStreamFn AddStream,
0058 Module &M, const ModuleSummaryIndex &CombinedIndex,
0059 const FunctionImporter::ImportMapTy &ImportList,
0060 const GVSummaryMapTy &DefinedGlobals,
0061 MapVector<StringRef, BitcodeModule> *ModuleMap,
0062 bool CodeGenOnly, AddStreamFn IRAddStream = nullptr,
0063 const std::vector<uint8_t> &CmdArgs = std::vector<uint8_t>());
0064
0065 Error finalizeOptimizationRemarks(
0066 std::unique_ptr<ToolOutputFile> DiagOutputFile);
0067
0068
0069 BitcodeModule *findThinLTOModule(MutableArrayRef<BitcodeModule> BMs);
0070
0071
0072 Expected<BitcodeModule> findThinLTOModule(MemoryBufferRef MBRef);
0073
0074
0075
0076
0077 bool initImportList(const Module &M, const ModuleSummaryIndex &CombinedIndex,
0078 FunctionImporter::ImportMapTy &ImportList);
0079 }
0080 }
0081
0082 #endif