llvm::gatherImportedSummariesForModule

Compute summaries needed for ThinLTO backend compilation of a module.

Synopsis

Declared in <llvm/Transforms/IPO/FunctionImport.h>

void
gatherImportedSummariesForModule(
    StringRef ModulePath,
    DenseMap<StringRef, GVSummaryMapTy> const& ModuleToDefinedGVSummaries,
    FunctionImporter::ImportMapTy const& ImportList,
    ModuleToSummariesForIndexTy& ModuleToSummariesForIndex,
    GVSummaryPtrSet& DecSummaries);

Description

This includes summaries from that module (in case any global summary based optimizations were recorded) and from any definitions in other modules that should be imported.

Parameters

NameDescription
ModulePathPath of the module being compiled in the ThinLTO backend.
ModuleToDefinedGVSummariesMap from each module to its defined GV summaries.
ImportListImports selected for ModulePath.
ModuleToSummariesForIndexPopulated with the needed summaries from each required module path. Use a std::map instead of StringMap to get stable order for bitcode emission.
DecSummariesPopulated with the subset of summary pointers that have 'declaration' import type among all summaries the module needs.