16#ifndef LLVM_LTO_LTOBACKEND_H
17#define LLVM_LTO_LTOBACKEND_H
37bool opt(
const Config &Conf, TargetMachine *TM,
unsigned Task, Module &
Mod,
38 bool IsThinLTO, ModuleSummaryIndex *ExportSummary,
39 const ModuleSummaryIndex *ImportSummary,
40 const std::vector<uint8_t> &CmdArgs);
45 unsigned ParallelCodeGenParallelismLevel, Module &M,
46 ModuleSummaryIndex &CombinedIndex);
58 Module &M,
const ModuleSummaryIndex &CombinedIndex,
59 const FunctionImporter::ImportMapTy &ImportList,
61 MapVector<StringRef, BitcodeModule> *ModuleMap,
62 bool CodeGenOnly,
AddStreamFn IRAddStream =
nullptr,
63 const std::vector<uint8_t> &CmdArgs = std::vector<uint8_t>());
66 std::unique_ptr<ToolOutputFile> DiagOutputFile);
77bool initImportList(
const Module &M,
const ModuleSummaryIndex &CombinedIndex,
78 FunctionImporter::ImportMapTy &ImportList);
Machine Check Debug Module
This file implements a map that provides insertion order iteration.
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
@ C
The default llvm calling convention, compatible with C.
BitcodeModule * findThinLTOModule(MutableArrayRef< BitcodeModule > BMs)
Returns the BitcodeModule that is ThinLTO.
Error backend(const Config &C, AddStreamFn AddStream, unsigned ParallelCodeGenParallelismLevel, Module &M, ModuleSummaryIndex &CombinedIndex)
Runs a regular LTO backend.
Error finalizeOptimizationRemarks(std::unique_ptr< ToolOutputFile > DiagOutputFile)
bool initImportList(const Module &M, const ModuleSummaryIndex &CombinedIndex, FunctionImporter::ImportMapTy &ImportList)
Distributed ThinLTO: collect the referenced modules based on module summary and initialize ImportList...
Error thinBackend(const Config &C, unsigned Task, AddStreamFn AddStream, Module &M, const ModuleSummaryIndex &CombinedIndex, const FunctionImporter::ImportMapTy &ImportList, const GVSummaryMapTy &DefinedGlobals, MapVector< StringRef, BitcodeModule > *ModuleMap, bool CodeGenOnly, AddStreamFn IRAddStream=nullptr, const std::vector< uint8_t > &CmdArgs=std::vector< uint8_t >())
Runs a ThinLTO backend.
This is an optimization pass for GlobalISel generic memory operations.
std::function< Expected< std::unique_ptr< CachedFileStream > >(unsigned Task, const Twine &ModuleName)> AddStreamFn
This type defines the callback to add a file that is generated on the fly.
@ Mod
The access may modify the value stored in memory.
DenseMap< GlobalValue::GUID, GlobalValueSummary * > GVSummaryMapTy
Map of global value GUID to its summary, used to identify values defined in a particular module,...