Runs a ThinLTO backend.
Declared in <llvm/LTO/LTOBackend.h>
Error
thinBackend(
Config const& C,
unsigned int Task,
AddStreamFn AddStream,
Module& M,
ModuleSummaryIndex const& CombinedIndex,
FunctionImporter::ImportMapTy const& ImportList,
GVSummaryMapTy const& DefinedGlobals,
MapVector<StringRef, BitcodeModule>* ModuleMap,
bool CodeGenOnly,
ArrayRef<StringRef> BitcodeLibFuncs,
AddStreamFn IRAddStream = nullptr,
std::vector<uint8_t> const& CmdArgs = std::vector<uint8_t>());
If ModuleMap is not nullptr, all the module files to be imported have already been mapped to memory and the corresponding BitcodeModule objects are saved in the ModuleMap. If ModuleMap is nullptr, module files will be mapped to memory on demand and at any given time during importing, only one source module will be kept open at the most. If CodeGenOnly is true, the backend will skip optimization and only perform code generation. If IRAddStream is not nullptr, it will be called just before code generation to serialize the optimized IR.
Success, or an error from importing, optimization, or code generation.
| Name | Description |
|---|---|
| C | LTO configuration for optimization and code generation. |
| Task | Task identifier for this ThinLTO backend partition. |
| AddStream | Callback that creates an output stream for generated code. |
| M | Module to optimize, import into, and code-generate. |
| CombinedIndex | Combined module summary index for the link. |
| ImportList | Map of source modules and GUIDs to import into M. |
| DefinedGlobals | Summaries of globals defined in M. |
| ModuleMap | Optional map of already-loaded BitcodeModule objects keyed by module path; null loads modules on demand. |
| CodeGenOnly | Whether to skip optimization and only run code generation. |
| BitcodeLibFuncs | Names of bitcode runtime library functions. |
| IRAddStream | Optional callback invoked to serialize optimized IR before code generation. |
| CmdArgs | Command-line arguments optionally embedded in the module. |