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

Name

Description

ModulePath

Path of the module being compiled in the ThinLTO backend.

ModuleToDefinedGVSummaries

Map from each module to its defined GV summaries.

ImportList

Imports selected for ModulePath.

ModuleToSummariesForIndex

Populated with the needed summaries from each required module path. Use a std::map instead of StringMap to get stable order for bitcode emission.

DecSummaries

Populated with the subset of summary pointers that have 'declaration' import type among all summaries the module needs.

Created with MrDocs