14 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H 15 #define LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H 40 bool HasExportedFunctions =
false;
58 bool isNonRenamableLocal(
const GlobalValue &GV)
const;
63 bool isPerformingImport()
const {
return GlobalsToImport !=
nullptr; }
64 bool isModuleExporting()
const {
return HasExportedFunctions; }
72 std::string getPromotedName(
const GlobalValue *SGV);
78 void processGlobalsForThinLTO();
91 : M(M), ImportIndex(Index), GlobalsToImport(GlobalsToImport) {
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming.
bool hasExportedFunctions(const Module &M) const
Check if the given Module has any functions available for exporting in the index. ...
Class to hold module path string table and global value map, and encapsulate methods for operating on...
bool renameModuleForThinLTO(Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue *> *GlobalsToImport=nullptr)
Perform in-place global value handling on the given Module for exported local functions renamed and p...
FunctionImportGlobalProcessing(Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue *> *GlobalsToImport=nullptr)
Struct that holds a reference to a particular GUID in a global value summary.
void computeSyntheticCounts(ModuleSummaryIndex &Index)
Compute synthetic function entry counts.
GlobalVariable * collectUsedGlobalVariables(const Module &M, SmallPtrSetImpl< GlobalValue *> &Set, bool CompilerUsed)
Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that ...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
LinkageTypes
An enumeration for the kinds of linkage for global values.
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
A vector that has set insertion semantics.