LLVM  8.0.1
Public Member Functions | Static Public Member Functions | List of all members
llvm::FunctionImportGlobalProcessing Class Reference

Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming. More...

#include "llvm/Transforms/Utils/FunctionImportUtils.h"

Public Member Functions

 FunctionImportGlobalProcessing (Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue *> *GlobalsToImport=nullptr)
 
bool run ()
 

Static Public Member Functions

static bool doImportAsDefinition (const GlobalValue *SGV, SetVector< GlobalValue *> *GlobalsToImport)
 Checks if we should import SGV as a definition, otherwise import as a declaration. More...
 

Detailed Description

Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming.

Definition at line 26 of file FunctionImportUtils.h.

Constructor & Destructor Documentation

◆ FunctionImportGlobalProcessing()

llvm::FunctionImportGlobalProcessing::FunctionImportGlobalProcessing ( Module M,
const ModuleSummaryIndex Index,
SetVector< GlobalValue *> *  GlobalsToImport = nullptr 
)
inline

Member Function Documentation

◆ doImportAsDefinition()

bool FunctionImportGlobalProcessing::doImportAsDefinition ( const GlobalValue SGV,
SetVector< GlobalValue *> *  GlobalsToImport 
)
static

Checks if we should import SGV as a definition, otherwise import as a declaration.

Definition at line 21 of file FunctionImportUtils.cpp.

References llvm::GlobalValue::AppendingLinkage, assert(), llvm::GlobalValue::AvailableExternallyLinkage, C, llvm::GlobalValue::CommonLinkage, llvm::SetVector< T, Vector, Set >::count(), llvm::GlobalValue::DefaultStorageClass, llvm::dyn_cast(), llvm::FunctionSummary::entryCount(), llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, F(), llvm::ModuleSummaryIndex::findSummaryInModule(), llvm::GlobalValue::getComdat(), llvm::ModuleSummaryIndex::getGlobalNameForLocal(), llvm::GlobalValue::getGUID(), llvm::GlobalValue::getLinkage(), llvm::ModuleSummaryIndex::getModuleHash(), llvm::Module::getModuleIdentifier(), llvm::Value::getName(), llvm::Module::getOrInsertComdat(), llvm::GlobalValue::getParent(), llvm::ValueInfo::getSummaryList(), llvm::ModuleSummaryIndex::getValueInfo(), llvm::Module::globals(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::GlobalValue::hasSection(), llvm::ModuleSummaryIndex::hasSyntheticEntryCounts(), llvm::GlobalValue::HiddenVisibility, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::isDeclaration(), llvm::ValueInfo::isDSOLocal(), llvm::GlobalValue::isLocalLinkage(), llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, llvm::GlobalValueSummary::modulePath(), Name, llvm::Function::PCT_Synthetic, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::setDLLStorageClass(), llvm::GlobalValue::setDSOLocal(), llvm::GlobalValue::setLinkage(), llvm::Value::setName(), llvm::GlobalValue::setVisibility(), llvm::StringRef::str(), VI, llvm::GlobalValue::WeakAnyLinkage, llvm::GlobalValue::WeakODRLinkage, and llvm::ModuleSummaryIndex::withGlobalValueDeadStripping().

◆ run()

bool FunctionImportGlobalProcessing::run ( )

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