|
LLVM
7.0.0
|
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... | |
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.
|
inline |
Definition at line 86 of file FunctionImportUtils.h.
References llvm::collectUsedGlobalVariables(), llvm::ModuleSummaryIndex::hasExportedFunctions(), llvm::renameModuleForThinLTO(), and run().
|
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, llvm::GlobalValue::CommonLinkage, llvm::SetVector< T, Vector, Set >::count(), llvm::GlobalValue::DefaultStorageClass, llvm::dyn_cast(), llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::ModuleSummaryIndex::findSummaryInModule(), llvm::ModuleSummaryIndex::getGlobalNameForLocal(), llvm::GlobalValue::getGUID(), llvm::GlobalValue::getLinkage(), llvm::ModuleSummaryIndex::getModuleHash(), llvm::Module::getModuleIdentifier(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::ModuleSummaryIndex::getValueInfo(), llvm::Module::globals(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::GlobalValue::hasSection(), llvm::GlobalValue::HiddenVisibility, llvm::GlobalValue::InternalLinkage, llvm::ValueInfo::isDSOLocal(), llvm::GlobalValue::isLocalLinkage(), llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::setDLLStorageClass(), llvm::GlobalValue::setDSOLocal(), llvm::GlobalValue::setLinkage(), llvm::Value::setName(), llvm::GlobalValue::setVisibility(), VI, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
| bool FunctionImportGlobalProcessing::run | ( | ) |
Definition at line 253 of file FunctionImportUtils.cpp.
Referenced by FunctionImportGlobalProcessing(), and llvm::renameModuleForThinLTO().
1.8.13