LLVM
8.0.1
|
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 91 of file FunctionImportUtils.h.
References llvm::collectUsedGlobalVariables(), llvm::computeSyntheticCounts(), 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, 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().
bool FunctionImportGlobalProcessing::run | ( | ) |
Definition at line 304 of file FunctionImportUtils.cpp.
Referenced by FunctionImportGlobalProcessing(), and llvm::renameModuleForThinLTO().