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);
55 Module &M,
const ModuleSummaryIndex &CombinedIndex,
58 MapVector<StringRef, BitcodeModule> *ModuleMap,
59 const std::vector<uint8_t> &CmdArgs = std::vector<uint8_t>());
62 std::unique_ptr<ToolOutputFile> DiagOutputFile);
73bool initImportList(
const Module &M,
const ModuleSummaryIndex &CombinedIndex,
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...
DenseMap< StringRef, FunctionsToImportTy > ImportMapTy
The map contains an entry for every module to import from, the key being the module identifier to pas...
@ C
The default llvm calling convention, compatible with C.
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, const std::vector< uint8_t > &CmdArgs=std::vector< uint8_t >())
Runs a ThinLTO backend.
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...
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,...