14#ifndef LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H
15#define LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H
40 bool HasExportedFunctions =
false;
53 bool ClearDSOLocalOnDeclarations;
71 bool isNonRenamableLocal(
const GlobalValue &GV)
const;
76 bool isPerformingImport()
const {
return GlobalsToImport !=
nullptr; }
77 bool isModuleExporting()
const {
return HasExportedFunctions; }
85 std::string getPromotedName(
const GlobalValue *SGV);
91 void processGlobalsForThinLTO();
103 bool ClearDSOLocalOnDeclarations)
104 : M(M), ImportIndex(
Index), GlobalsToImport(GlobalsToImport),
105 ClearDSOLocalOnDeclarations(ClearDSOLocalOnDeclarations) {
110 if (!GlobalsToImport)
129 Module &M,
const ModuleSummaryIndex &
Index,
130 bool ClearDSOLocalOnDeclarations,
131 SetVector<GlobalValue *> *GlobalsToImport =
nullptr);
Machine Check Debug Module
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
This file implements a set that has insertion order iteration characteristics.
Class to handle necessary GlobalValue changes required by ThinLTO function importing,...
FunctionImportGlobalProcessing(Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue * > *GlobalsToImport, bool ClearDSOLocalOnDeclarations)
LinkageTypes
An enumeration for the kinds of linkage for global values.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
bool hasExportedFunctions(const Module &M) const
Check if the given Module has any functions available for exporting in the index.
A Module instance is used to store all the information related to an LLVM module.
A vector that has set insertion semantics.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
bool renameModuleForThinLTO(Module &M, const ModuleSummaryIndex &Index, bool ClearDSOLocalOnDeclarations, SetVector< GlobalValue * > *GlobalsToImport=nullptr)
Perform in-place global value handling on the given Module for exported local functions renamed and p...
GlobalVariable * collectUsedGlobalVariables(const Module &M, SmallVectorImpl< GlobalValue * > &Vec, bool CompilerUsed)
Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that ...
Struct that holds a reference to a particular GUID in a global value summary.