LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::FunctionImporter Class Reference

The function importer is automatically importing function from other modules based on the provided summary informations. More...

#include "llvm/Transforms/IPO/FunctionImport.h"

Public Types

using FunctionsToImportTy = std::map< GlobalValue::GUID, unsigned >
 Set of functions to import from a source module. More...
 
using ImportMapTy = StringMap< FunctionsToImportTy >
 The map contains an entry for every module to import from, the key being the module identifier to pass to the ModuleLoader. More...
 
using ExportSetTy = std::unordered_set< GlobalValue::GUID >
 The set contains an entry for every global value the module exports. More...
 
using ModuleLoaderTy = std::function< Expected< std::unique_ptr< Module > >(StringRef Identifier)>
 A function of this type is used to load modules referenced by the index. More...
 

Public Member Functions

 FunctionImporter (const ModuleSummaryIndex &Index, ModuleLoaderTy ModuleLoader)
 Create a Function Importer. More...
 
Expected< boolimportFunctions (Module &M, const ImportMapTy &ImportList)
 Import functions in Module M based on the supplied import list. More...
 

Detailed Description

The function importer is automatically importing function from other modules based on the provided summary informations.

Definition at line 34 of file FunctionImport.h.

Member Typedef Documentation

◆ ExportSetTy

The set contains an entry for every global value the module exports.

Definition at line 48 of file FunctionImport.h.

◆ FunctionsToImportTy

Set of functions to import from a source module.

Each entry is a map containing all the functions to import for a source module. The keys is the GUID identifying a function to import, and the value is the threshold applied when deciding to import it.

Definition at line 40 of file FunctionImport.h.

◆ ImportMapTy

The map contains an entry for every module to import from, the key being the module identifier to pass to the ModuleLoader.

The value is the set of functions to import.

Definition at line 45 of file FunctionImport.h.

◆ ModuleLoaderTy

A function of this type is used to load modules referenced by the index.

Definition at line 52 of file FunctionImport.h.

Constructor & Destructor Documentation

◆ FunctionImporter()

llvm::FunctionImporter::FunctionImporter ( const ModuleSummaryIndex Index,
ModuleLoaderTy  ModuleLoader 
)
inline

Create a Function Importer.

Definition at line 55 of file FunctionImport.h.

References importFunctions().

Member Function Documentation

◆ importFunctions()

Expected< bool > FunctionImporter::importFunctions ( Module M,
const ImportMapTy ImportList 
)

The documentation for this class was generated from the following files: